/* BiRN/QNG-Plattform – Gestaltung „Glas über Mineralgrund“ (Version 2, 30.10.2026)
   Ruhiger, mineralischer Hintergrund mit zwei weichen Farbfeldern; Arbeitsflächen als helles Glas.
   Wenig Linien: Gruppen über Abstand und Flächen, Zeilen über eine dezente Hover-Fläche.
   Keine externen Schriften (Datenschutz): Systemschrift, unter Windows Segoe UI Variable. */
:root {
  --ink: #1C2B27; --ink-2: #3F504B; --muted: #52615B; --faint: #5A6963;  /* beide ≥ 4,5 : 1 auf Grund und Glas */
  --brand: #1F6B57; --brand-dark: #154C3E; --brand-soft: rgba(31,107,87,.10); --brand-line: rgba(31,107,87,.28);
  --bg: #E6ECE9; --lichen: #A9CDBB; --sky: #BCD3E6;
  --glass: rgba(255,255,255,.74); --glass-strong: rgba(255,255,255,.82); --glass-weak: rgba(255,255,255,.38);
  --glass-edge: rgba(255,255,255,.75); --hair: rgba(28,43,39,.08); --hair-2: rgba(28,43,39,.05);
  --side: rgba(19,38,33,.86); --side-text: #D3DED9; --side-muted: #A9BCB5; --side-hover: rgba(255,255,255,.07);
  --ok-bg: rgba(47,125,79,.12); --ok: #23643E; --warn-bg: rgba(183,121,31,.14); --warn: #835207;
  --crit-bg: rgba(180,68,58,.12); --crit: #9A3027; --info-bg: rgba(45,106,159,.12); --info: #24578A; --mute-bg: rgba(28,43,39,.06);
  --r-lg: 18px; --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 1px rgba(20,40,34,.04), 0 8px 28px -12px rgba(20,40,34,.18);
  --font: 'Segoe UI Variable Text', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-d: 'Segoe UI Variable Display', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: var(--r);
  /* Bewegung (Etappe 17): kräftige Ease-out-Kurve für Rückmeldung, kurze Dauern – die App wird täglich oft benutzt */
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --t-press: 120ms; --t-fast: 150ms; --t-pop: 170ms; --t-dlg: 220ms;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
       background: var(--bg); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
       background-image: radial-gradient(60vw 50vh at 8% -5%, var(--lichen) 0, transparent 70%),
                         radial-gradient(55vw 55vh at 105% 105%, var(--sky) 0, transparent 70%),
                         linear-gradient(160deg, #EEF2F0 0%, #E3EAE7 100%); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
h1 { margin: 0; font-family: var(--font-d); font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -.015em; }
h2 { margin: 0; font-family: var(--font-d); font-size: 17px; font-weight: 650; letter-spacing: -.005em; }
h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.mono { font-family: var(--mono); font-size: .92em; }
.sub { color: var(--muted); font-size: 13px; }
.hint { color: var(--faint); font-size: 12px; line-height: 1.4; font-weight: 400; max-width: 62ch; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 60; background: #fff; color: var(--brand-dark); border: 0; border-radius: 10px;
        padding: 10px 16px; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, color, background-color, box-shadow !important; scroll-behavior: auto !important; }
  :active { transform: none !important; }
}

/* Rahmen ------------------------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 244px; flex: 0 0 244px; padding: 20px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0;
        height: 100vh; overflow-y: auto; background: var(--side); backdrop-filter: blur(22px) saturate(140%);
        -webkit-backdrop-filter: blur(22px) saturate(140%); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #fff; text-decoration: none; }
.brand b { font-size: 15px; display: block; font-weight: 650; }
.brand span { color: var(--side-muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav .head { color: var(--side-muted); font-size: 12px; padding: 12px 12px 2px; }
.nav .proj { color: #fff; font-size: 13.5px; font-weight: 600; padding: 0 12px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--side-text); text-decoration: none;
         font-size: 14px; min-height: 38px; transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { background: var(--side-hover); color: #fff; } }
.nav a.on { background: rgba(255,255,255,.92); color: var(--brand-dark); font-weight: 600; }
.nav .sep { height: 10px; }
.who { margin-top: auto; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); color: var(--side-text); font-size: 12px;
       display: flex; flex-direction: column; gap: 8px; }
.who b { color: #fff; font-size: 13px; }
.who select { background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 8px; padding: 5px 8px; max-width: 100%; }
.who button { background: none; border: 0; color: var(--side-text); border-radius: 8px; padding: 6px 8px; cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .who button:hover { color: #fff; background: var(--side-hover); } }
.main { flex: 1 1 auto; min-width: 0; padding: 30px 40px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1480px; }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 4px; }
.top .titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.top .titles > .sub { max-width: 78ch; }
.crumbs { font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Glasflächen -------------------------------------------------------------------------------- */
.card { background: var(--glass); border-radius: var(--r-lg); box-shadow: var(--shadow), inset 0 0 0 1px var(--glass-edge);
        }
.card.solid { background: var(--glass-strong); }
.card .card { background: var(--glass-weak); box-shadow: inset 0 0 0 1px var(--hair-2); }
.pad { padding: 22px 24px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }  /* vier Kennzahlen: 4 × 1, schmaler 2 × 2, nie eine allein */
.g-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g-cat { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi { padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.kpi .chip { align-self: flex-start; }
.kpi .v { font-family: var(--font-d); font-size: 32px; font-weight: 650; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.section-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 20px 24px 6px; }
.section-h .sub { font-size: 12.5px; }

/* Marker, Knöpfe ---------------------------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ok { background: var(--ok-bg); color: var(--ok); } .warn { background: var(--warn-bg); color: var(--warn); }
.crit { background: var(--crit-bg); color: var(--crit); } .info { background: var(--info-bg); color: var(--info); }
.mute { background: var(--mute-bg); color: var(--ink-2); } .brandc { background: var(--brand-soft); color: var(--brand-dark); }
.tag { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--mute-bg); color: var(--ink-2); margin-left: 6px; }
.tag.q { background: var(--info-bg); color: var(--info); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-radius: 11px;
       border: 0; background: var(--glass-strong); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
       box-shadow: inset 0 0 0 1px rgba(28,43,39,.12);
       transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.btn:active:not([disabled]) { transform: scale(.97); }
.btn.sm { white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand-dark); } }
.btn.pri { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(31,107,87,.7); }
@media (hover: hover) and (pointer: fine) { .btn.pri:hover { background: var(--brand-dark); color: #fff; } }
.btn.ghost { background: transparent; box-shadow: none; color: var(--brand); padding: 0 10px; }
@media (hover: hover) and (pointer: fine) { .btn.ghost:hover { background: var(--brand-soft); } }
.btn.danger { color: var(--crit); }
.btn.sm { min-height: 30px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
label.btn:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 0; background: transparent; color: var(--muted);
            cursor: pointer; font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--brand-soft); color: var(--brand-dark); } }
.bar { height: 6px; border-radius: 3px; background: rgba(28,43,39,.09); overflow: hidden; width: 120px; display: inline-block; vertical-align: middle; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 3px; width: 0; }
.scale { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(28,43,39,.08) 0 50%, rgba(31,107,87,.18) 50% 65.1%, rgba(31,107,87,.32) 65.1% 80%, rgba(31,107,87,.5) 80% 100%); }
.scale > span { position: absolute; top: -5px; width: 4px; height: 20px; border-radius: 2px; background: var(--ink); margin-left: -2px; }
.scale-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.big { font-family: var(--font-d); font-size: 46px; font-weight: 650; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Tabellen: ohne Gitter, Zeilen über Fläche ---------------------------------------------------- */
.tbl { overflow-x: auto; padding: 4px 8px 8px; position: relative; }
td select.in { max-width: 240px; }
label.btn { position: relative; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 12px 12px 8px; white-space: nowrap; }
td { padding: 10px 12px; vertical-align: middle; overflow-wrap: break-word; }
th.act { width: 1%; }
.row.nowrap { flex-wrap: nowrap; justify-content: flex-end; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu[open] > .menu { display: flex; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; flex-direction: column; gap: 2px; padding: 6px;
        background: #fff; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(20,40,34,.35), inset 0 0 0 1px var(--hair); }
.menu button, .menu label, .menu a { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: none;
        text-align: left; font-weight: 500; color: var(--ink); cursor: pointer; text-decoration: none; font-size: 14px; white-space: nowrap; }
.menu button:hover, .menu label:hover, .menu a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.menu .danger { color: var(--crit); }
.skel { display: inline-block; width: 56px; height: .9em; border-radius: 6px; vertical-align: middle;
        background: linear-gradient(90deg, rgba(28,43,39,.06), rgba(28,43,39,.12), rgba(28,43,39,.06)); background-size: 200% 100%;
        animation: skel 1.2s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.kpi .v .skel { width: 40px; height: 28px; }
tbody tr td:first-child { border-radius: 10px 0 0 10px; } tbody tr td:last-child { border-radius: 0 10px 10px 0; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover td { background: rgba(255,255,255,.55); } }
tr.grp td { font-weight: 650; font-size: 12.5px; color: var(--ink-2); padding-top: 18px; background: none !important; }
tbody tr.click { cursor: pointer; }
td.r, th.r { text-align: right; }
.cell-strong { font-weight: 600; }

/* Formulare --------------------------------------------------------------------------------- */
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.f .hint, .f-hint { margin-top: -1px; }
.in, select.in, textarea.in { border: 0; border-radius: 10px; padding: 9px 12px; background: rgba(255,255,255,.78); min-height: 38px; font-weight: 400;
       color: var(--ink); box-shadow: inset 0 0 0 1px rgba(28,43,39,.13); transition: box-shadow var(--t-fast) ease, background-color var(--t-fast) ease; }
textarea.in { min-height: 104px; resize: vertical; line-height: 1.5; }
@media (hover: hover) and (pointer: fine) { .in:hover { box-shadow: inset 0 0 0 1px rgba(28,43,39,.22); } }
.in:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px rgba(31,107,87,.12); }
.in[disabled] { background: rgba(255,255,255,.4); color: var(--muted); }
.in.small { min-height: 30px; padding: 4px 8px; width: 96px; }
.form-grid { display: grid; gap: 16px 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.fieldset { display: flex; flex-direction: column; gap: 14px; }
.fieldset + .fieldset { margin-top: 26px; }
.fieldset > h3 { font-size: 13.5px; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.check .hint { display: block; margin-top: 2px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(28,43,39,.06); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 13px; border-radius: 8px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(20,40,34,.12); }
.save-bar { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }

/* Reiter ------------------------------------------------------------------------------------ */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--glass); align-self: flex-start;
        box-shadow: inset 0 0 0 1px var(--glass-edge); }
.tabs a, .tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
        text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tabs a:hover, .tabs button:hover { background: rgba(255,255,255,.6); color: var(--ink); } }
.tabs a.on, .tabs button.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 4px rgba(20,40,34,.12); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.aside-note { position: sticky; top: calc(var(--sticky-top) + 24px); }

/* Optionsbaum ------------------------------------------------------------------------------- */
.ind { border-radius: 14px; background: var(--glass-weak); overflow: hidden; }
.ind + .ind { margin-top: 10px; }
.ind-h { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px 6px; }
.ind-b { padding: 4px 12px 12px; }
.node-g { margin: 8px 0 4px; padding-left: 0; }
.node-g .gh { font-size: 12px; color: var(--muted); font-weight: 600; margin: 6px 6px 2px; }
.node-g .node-g { padding-left: 16px; margin-left: 6px; box-shadow: inset 2px 0 0 rgba(28,43,39,.07); }
.opt { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 8px 8px; border-radius: 10px; align-items: start; }
@media (hover: hover) and (pointer: fine) { .opt:hover { background: rgba(255,255,255,.65); } }
.opt input { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 2px; }
.opt .lbl { white-space: pre-line; font-size: 14px; }
.opt .pts { font-size: 13px; font-weight: 600; white-space: nowrap; text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.opt.base .lbl::before { content: "Basis · "; font-weight: 600; color: var(--brand); }

/* Hinweise, Dialoge -------------------------------------------------------------------------- */
.note { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; }
.finding { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; align-items: start; }
@media (hover: hover) and (pointer: fine) { .finding:hover { background: rgba(255,255,255,.55); } }
.finding .ic { font-weight: 700; text-align: center; border-radius: 7px; height: 22px; line-height: 22px; font-size: 12px; }
dialog { border: 0; border-radius: 20px; padding: 0; width: min(660px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
         background: rgba(250,252,251,.9); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
         box-shadow: 0 30px 80px -20px rgba(20,40,34,.45), inset 0 0 0 1px var(--glass-edge); color: var(--ink); }
dialog.wide { width: min(920px, calc(100vw - 32px)); }
dialog[open] { animation: dlg-in var(--t-dlg) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
dialog[open]::backdrop { animation: fade-in var(--t-dlg) ease-out; }
@keyframes fade-in { from { opacity: 0; } }
dialog::backdrop { background: rgba(19,38,33,.32); backdrop-filter: blur(3px); }
dialog form.dlg { padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { font-size: 19px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: rgba(19,38,33,.95); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); }
.toast.err { background: rgba(154,48,39,.95); }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.loading { padding: 8px 0; display: flex; flex-direction: column; gap: 14px; }
.loading .skel { display: block; height: 18px; } .loading .l1 { width: 38%; height: 30px; } .loading .l2 { width: 100%; height: 120px; border-radius: 18px; }
.loading .l3 { width: 100%; height: 280px; border-radius: 18px; }
.side-bar { display: flex; align-items: center; }
.side-bar .where { display: none; }
.copy { display: flex; gap: 8px; } .copy input { flex: 1; font-family: var(--mono); font-size: 13px; }
.files { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.grant { min-width: 74px; }
.matrix th, .matrix td { text-align: center; padding: 7px 6px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: rgba(244,247,245,.96); z-index: 1; min-width: 210px; }
.pill-btn { border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(28,43,39,.05); cursor: pointer; font-size: 12px; font-weight: 600; min-width: 70px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .pill-btn:hover { background: rgba(28,43,39,.1); } }
.pill-btn.read { background: var(--info-bg); color: var(--info); }
.pill-btn.write { background: var(--warn-bg); color: var(--warn); }
.pill-btn.review { background: var(--ok-bg); color: var(--ok); }
.taskmark { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-bg);
            border-radius: 999px; padding: 1px 8px; text-decoration: none; }
.taskmark:hover { color: var(--warn); filter: brightness(.95); }

/* Anmeldung --------------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: min(420px, 100%); padding: 30px; display: flex; flex-direction: column; gap: 18px; background: var(--glass-strong); }
.auth .brand { color: var(--ink); padding: 0; }
.auth .brand span { color: var(--muted); }

/* Aufgaben-Board: Hinweis ohne Karten (Rest siehe „Aufgaben-Boards“ am Ende) */
.board-help { padding: 14px 18px; }

/* Beratungsgespräch -------------------------------------------------------------------------- */
.topic { padding: 14px 16px; border-radius: 14px; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 10px; }
.topic + .topic { margin-top: 6px; }
@media (hover: hover) and (pointer: fine) { .topic:hover { background: rgba(255,255,255,.45); } }
.topic.on { background: rgba(255,255,255,.62); }
.topic .t-body { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.t-det > summary { display: flex; flex-direction: column; gap: 2px; }
.t-det > summary .t-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.t-det > summary .t-head b::after { content: " ▸"; color: var(--muted); font-weight: 400; }
.t-det[open] > summary .t-head b::after { content: " ▾"; }
.t-prev { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.t-det[open] .t-prev { display: none; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.jump { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: calc(var(--sticky-top) + 8px); z-index: 5; padding: 6px; border-radius: 14px; align-self: flex-start;
        background: var(--glass-strong); box-shadow: var(--shadow), inset 0 0 0 1px var(--glass-edge); }
.jump .pill-btn { color: var(--ink-2); min-height: 34px; }
.topic .t-guide { font-size: 13px; color: var(--ink-2); }
.topic .t-guide li { margin: 2px 0; }
.topic .t-guide ul { margin: 2px 0 0; padding-left: 18px; }
.blocks { display: flex; flex-wrap: wrap; gap: 6px; }
.block-btn { border: 0; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; background: rgba(31,107,87,.08); color: var(--brand-dark); cursor: pointer; text-align: left; }
@media (hover: hover) and (pointer: fine) { .block-btn:hover { background: rgba(31,107,87,.16); } }
.crit-links { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.crit-links a { text-decoration: none; background: var(--info-bg); color: var(--info); border-radius: 6px; padding: 1px 7px; font-weight: 600; }

pre.preview { white-space: pre-wrap; font-family: var(--font); font-size: 13.5px; line-height: 1.55; margin: 0; max-height: 360px; overflow-y: auto; }
td textarea.in { width: 100%; min-width: 240px; min-height: 64px; }
.logo-prev { max-height: 56px; max-width: 220px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px 10px; }


/* Wohneinheiten ---------------------------------------------------------------------------- */
.units-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: end; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .in { width: 84px; text-align: center; }
.units-tbl { max-height: 46vh; overflow: auto; }
.units-tbl .in { min-width: 0; }
.units-tbl td .in:not(.small) { width: 100%; min-width: 140px; }
.units-tbl tfoot td { padding-top: 12px; font-weight: 600; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.unit-pick legend { margin-bottom: 6px; }

/* Baustein-Editor -------------------------------------------------------------------------- */
dialog.xwide { width: min(1240px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.tpl { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); }
.tpl-head { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: end; }
.tpl-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-radius: 12px; background: rgba(28,43,39,.04); }
.tpl-bar .sep { width: 1px; height: 22px; background: var(--hair); margin: 0 4px; }
.grow { flex: 1 1 auto; }
.tpl-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; min-height: 0; flex: 1 1 auto; }
.tpl-blocks { overflow-y: auto; max-height: calc(100vh - 290px); padding: 2px 6px 2px 2px; display: flex; flex-direction: column; gap: 8px; }
.tpl-raw textarea { font-family: var(--mono); font-size: 13px; }
.blk { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 10px 12px 12px 6px; border-radius: 12px; background: #fff;
       box-shadow: inset 0 0 0 1px var(--hair); }
.blk:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.blk.dragging { opacity: .45; }
.blk.drop-before { box-shadow: inset 0 3px 0 var(--brand); } .blk.drop-after { box-shadow: inset 0 -3px 0 var(--brand); }
.blk-title, .blk-subtitle { background: var(--brand-soft); }
.blk-handle { cursor: grab; color: var(--muted); font-size: 14px; letter-spacing: -2px; user-select: none; padding-top: 6px; text-align: center; }
.blk-handle.off { cursor: default; }
.blk-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.blk-type { font-size: 12px; font-weight: 600; color: var(--muted); }
select.blk-type { min-height: 28px; padding: 2px 8px; width: auto; }
.blk-tools { display: flex; gap: 2px; }
.blk-tools .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.blk-tools .icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.danger { color: var(--crit); }
.rich { min-height: 38px; padding: 8px 10px; border-radius: 9px; background: rgba(28,43,39,.03); box-shadow: inset 0 0 0 1px rgba(28,43,39,.1);
        line-height: 1.7; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand); }
.rich:empty::before { content: attr(data-placeholder); color: var(--faint); }
.rich.r-title { font-weight: 650; font-size: 16px; } .rich.r-head { font-weight: 650; flex: 1; }
.hrow { display: flex; gap: 8px; align-items: center; } .hnum { font-weight: 650; color: var(--brand); min-width: 20px; }
.ph { display: inline-block; padding: 0 8px; margin: 0 1px; border-radius: 999px; background: var(--info-bg); color: var(--info); font-size: 12.5px;
      font-weight: 600; line-height: 1.6; white-space: nowrap; user-select: all; }
.ph.mk { background: var(--warn-bg); color: var(--warn); }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; align-items: start; }
.kv .box { font-size: 18px; text-align: center; padding-top: 4px; }
.sign-row { flex-wrap: nowrap; } .sign-row select { width: 170px; } .sign-row input { flex: 1; min-width: 0; }
.ph-menu .menu { min-width: 420px; max-height: 60vh; overflow-y: auto; padding: 10px; gap: 10px; left: 0; right: auto; }
.ph-group { display: flex; flex-direction: column; gap: 4px; }
.ph-menu .block-btn { min-height: 0; }
.tpl-preview { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.paper { background: #fff; border-radius: 10px; padding: 26px 28px; box-shadow: 0 10px 30px -18px rgba(20,40,34,.45), inset 0 0 0 1px var(--hair);
         overflow-y: auto; max-height: calc(100vh - 300px); font-size: 12.5px; line-height: 1.55; }
.pv-title { font-size: 17px; font-weight: 650; color: var(--brand-dark); } .pv-sub { color: var(--muted); margin-top: 2px; }
.pv-kv { margin: 12px 0; font-size: 12px; } .pv-kv th { color: var(--muted); font-weight: 600; padding: 3px 12px 3px 0; white-space: normal; vertical-align: top; width: 34%; }
.pv-kv td { padding: 3px 0; }
.pv-h { font-weight: 650; margin: 14px 0 4px; color: var(--brand-dark); }
.pv-p { margin: 6px 0; }
mark.pv-ph { background: var(--info-bg); color: var(--info); border-radius: 4px; padding: 0 4px; }
.pv-sign { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 26px; }
.pv-sign div { display: flex; flex-direction: column; gap: 4px; min-width: 150px; color: var(--muted); font-size: 11.5px; }
.pv-sign span { display: block; border-bottom: 1px solid var(--ink); height: 26px; }
@media (max-width: 900px) {
  .tpl-head, .tpl-body { grid-template-columns: 1fr; }
  .tpl-blocks, .paper { max-height: none; }
  .tpl { overflow-y: auto; padding: 18px 16px; }
  .tpl .dlg-actions { flex-wrap: wrap; }
  .tpl .dlg-actions #tpl-reset { order: 3; width: 100%; }
  .tpl-bar .btn.sm { min-height: 36px; padding: 0 9px; }
  .kv { grid-template-columns: 1fr; }
  .ph-menu .menu { min-width: min(420px, calc(100vw - 64px)); }
}

@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } .aside-note { position: static; } }
@media (max-width: 1240px) { .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  /* Kopfleiste mit Menüknopf: Inhalt beginnt oben, Navigation erst auf Wunsch */
  .side { width: auto; flex: none; height: auto; position: sticky; top: 0; z-index: 30; padding: 10px 14px; gap: 10px; }
  .side-bar { display: flex; align-items: center; gap: 10px; }
  .side-bar .brand { flex: 0 0 auto; }
  .side-bar .brand div { display: none; }
  .side-bar .where { display: block; flex: 1 1 auto; min-width: 0; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px;
              background: rgba(255,255,255,.12); color: #fff; font-weight: 600; cursor: pointer; }
  .side:not(.open) .nav, .side:not(.open) .who { display: none; }
  .side.open { max-height: 100vh; overflow-y: auto; }
  .nav .head, .nav .sep { display: none; } .nav .proj { padding: 8px 12px 4px; }
  .nav a { min-height: 44px; }
  .who { margin-top: 0; }
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 23px; }
  .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pad { padding: 18px; }
  .btn, .btn.sm, .in, .in.small, .seg button, .tabs button, .tabs a, .icon-btn, .pill-btn { min-height: 42px; }
  .icon-btn { width: 42px; }
  .seg button { padding: 6px 14px; }
  .kpi { padding: 14px 16px; } .kpi .v { font-size: 26px; }
  .jump { top: calc(var(--sticky-top) + 8px); }
}
@media (max-width: 760px) {
  /* Tabellen als Karten: jede Zeile ein Block, Spaltenname vor dem Wert */
  .tbl table.cards, .tbl table.cards tbody, .tbl table.cards tr, .tbl table.cards td { display: block; width: 100%; }
  .tbl table.cards thead { display: none; }
  .tbl table.cards tr { padding: 10px 6px; border-radius: 12px; }
  .tbl table.cards tr + tr { box-shadow: 0 -1px 0 var(--hair); }
  .tbl table.cards tr.grp { box-shadow: none; padding-bottom: 0; }
  .tbl table.cards td { padding: 4px 8px; border-radius: 0 !important; }
  .tbl table.cards td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
  .tbl table.cards td:empty { display: none; }
  .tbl table.cards tbody tr:hover td { background: none; }
  .tbl table.cards .in.small { width: 100%; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: #F7F9F8; --glass-strong: #FFFFFF; --glass-weak: #EEF2F0; --side: #1B312B; }
  .side, dialog, dialog::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
  dialog { background: #FAFCFB; }
  body::before { display: none; }
}
@media (prefers-contrast: more) {
  :root { --glass: #FFFFFF; --glass-strong: #FFFFFF; --glass-edge: rgba(28,43,39,.35); --hair: rgba(28,43,39,.25); --muted: #3F504B; --faint: #3F504B; }
}
@media print { .side, .actions, #toasts, .tabs { display: none !important; } .main { padding: 0; } .card { box-shadow: none; backdrop-filter: none; background: #fff; } }

/* Aufklappbare Leitfäden */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2::before { content: "▸"; display: inline-block; width: 18px; color: var(--muted); transition: transform 200ms var(--ease-out); }
details[open] > summary h2::before { transform: rotate(90deg); }
details:not(.row-menu):not(.t-det)[open] > summary { margin-bottom: 12px; }
details ol { margin: 0; padding-left: 0; list-style: none; counter-reset: step; }
details ol li { counter-increment: step; padding: 8px 10px; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) { details ol li:hover { background: rgba(255,255,255,.5); } }
details ol li > span:first-child::before { content: counter(step) "  "; font-weight: 650; color: var(--brand); }
.topic input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.topic textarea.in { min-height: 60px; }
.h-sm { font-size: 14.5px; }
details + details { margin-top: 4px; }
.card details:not(.t-det):not(.row-menu) { border-radius: 12px; padding: 6px 8px; }
.card details:not(.t-det):not(.row-menu)[open] { background: rgba(255,255,255,.35); }

/* ---------- Etappe 6: Schadstoffe QNG 3.1.3 und Angebote & Honorar ---------- */
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.kpi .v small { font-size: 15px; font-weight: 600; }
.filters { align-items: flex-end; }
.filters .grow, .row .grow { flex: 1 1 220px; }
label.f.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.q-codes { margin-top: 2px; font-size: 11.5px; }
.tgl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tgl { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; cursor: pointer; padding: 10px 12px;
  border-radius: 12px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px var(--hair); font: inherit; font-weight: 600; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .tgl:hover { background: #fff; } }
.tgl[aria-pressed="true"] { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-dark); }
.tgl-c { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.55); }
.pill-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 18px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.pick-cat { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pick-cat legend { font-weight: 700; font-size: 13px; padding: 6px 0 2px; color: var(--brand-dark); }
.pick .check { font-size: 13px; }
.paper-prev { background: #fff; }
.paper-prev .pv-k { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.paper-prev .pv-t { font-family: var(--font-d); font-size: 20px; line-height: 1.2; }
.paper-prev .kv, .offer-res .kv { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 13px; }
.paper-prev .kv dd, .offer-res .kv dd { margin: 0; text-align: right; }
.paper-prev .kv dt, .offer-res .kv dt { color: var(--muted); }
.q-cat { padding: 0 20px 20px; }
.q-cat-h { margin: 18px 0 6px; font-size: 14px; color: var(--brand-dark); }
.q-row { border-radius: 12px; background: rgba(255,255,255,.55); margin-bottom: 6px; }
.q-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 14px; }
.q-row > summary::-webkit-details-marker { display: none; }
.q-row > summary .pos { font-weight: 700; color: var(--brand-dark); }
.q-row[open] > summary { border-bottom: 1px solid var(--hair); }
.q-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; padding: 12px 14px 14px 76px; font-size: 13.5px; }
.q-body h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.q-body ul { margin: 0; padding-left: 18px; }
.q-body .wide { grid-column: 1 / -1; }
select.q-conf.konform { box-shadow: inset 0 0 0 1.5px var(--ok); }
select.q-conf.nicht_konform { box-shadow: inset 0 0 0 1.5px var(--crit); }
select.q-conf.ausnahme { box-shadow: inset 0 0 0 1.5px var(--warn); }
/* Angebote */
.vchart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; height: 190px; }
.vcol { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.vbar { position: relative; flex: 1; width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: rgba(28,43,39,.05); }
.vbar span { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 3px 3px; }
.vbar .all { background: var(--lichen); }
.vbar .won { background: var(--brand); left: 22%; right: 22%; }
.legend { font-size: 12.5px; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg.all { background: var(--lichen); } .lg.won { background: var(--brand); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hb { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-t { height: 10px; border-radius: 5px; background: rgba(28,43,39,.06); overflow: hidden; }
.hb-f { display: block; height: 100%; border-radius: 5px; background: var(--muted); width: 0; }
.hb-f.ok { background: var(--ok); } .hb-f.info { background: var(--info); } .hb-f.crit { background: var(--crit); } .hb-f.brandc { background: var(--brand); } .hb-f.mute { background: rgba(28,43,39,.3); }
table.ed td { vertical-align: middle; }
table.ed .in.small { width: 100%; min-width: 72px; }
table.ed tr.off td { color: var(--muted); }
tr.tot td { border-top: 1px solid var(--hair); }
.tag-ed { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--mute-bg); font-size: 13px; font-weight: 600; }
.split.offer { grid-template-columns: minmax(0, 1fr) 340px; }
.offer-res { position: sticky; top: calc(var(--sticky-top) + 16px); }
.offer-res .big { font-size: 38px; }
ol.pos { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
ol.pos li > span { display: inline-flex; flex-direction: column; }
ol.pos li { display: list-item; }
ol.pos li b { float: right; margin-left: 8px; }
.row.geb { align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair-2); }
.row.geb > .in { flex: 1 1 160px; }
.vbar-row .tabs button .sub { font-weight: 500; margin-left: 4px; font-size: 11.5px; }
@media (max-width: 1100px) { .split.offer { grid-template-columns: minmax(0, 1fr); } .offer-res { position: static; } .q-body { padding-left: 14px; } }
fieldset.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.paper-prev .kv { grid-template-columns: 1fr; gap: 2px; }
.paper-prev .kv dd { text-align: left; margin-bottom: 6px; overflow-wrap: anywhere; }
.paper-prev .kv dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
ul.flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.flist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: start; }
ul.flist li a { overflow-wrap: anywhere; font-size: 13px; }
ul.flist li .hint { grid-column: 1; }
ul.flist li .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
table.ed select.in.small { min-width: 118px; }
.filters label.f { min-width: 0; max-width: 100%; } .filters select.in { max-width: 100%; min-width: 0; }
.link-row { flex-wrap: nowrap; } .link-row select.in { flex: 1 1 auto; min-width: 0; }

/* Pre-Check DGNB und Arbeitsfunktionen (Etappe 7) ------------------------------------------- */
.pill-btn.on { background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand-line); }
.droles { gap: 6px; }
.dq { overflow: hidden; }
.dqh h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; vertical-align: 1px;
  background: var(--qc, var(--brand)); }
.dqh.q1 { --qc: #4CAE49; } .dqh.q2 { --qc: #29538D; } .dqh.q3 { --qc: #89AA34; } .dqh.q4 { --qc: #1FA4D9; } .dqh.q5 { --qc: #6660AA; } .dqh.q6 { --qc: #039AAA; }
.dcrit { border-top: 1px solid var(--hair-2); }
.dcrit > summary { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 18px; cursor: pointer; list-style: none; }
.dcrit > summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .dcrit > summary:hover { background: rgba(255,255,255,.55); } }
.dcrit[open] > summary { background: rgba(255,255,255,.6); }
.dcrit .did { font-weight: 600; color: var(--brand-dark); }
.dcrit .dt { min-width: 0; }
.dcrit .dv { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dcrit .dv .bar { width: 80px; }
.dcrit .bn, .tag.bn { color: #8A5A08; }
.tag.bn { background: rgba(183,121,31,.12); }
.tag.tx { background: rgba(112,120,128,.14); color: #4A525A; }
.dbody { padding: 6px 18px 18px; }
.dhelp > summary, .daudit > summary, .onote > summary { cursor: pointer; color: var(--brand); font-size: 12.5px; font-weight: 600; width: max-content; max-width: 100%; }
.dhelp > div { padding: 6px 0 2px; font-size: 13px; color: var(--ink-2); }
.dhelp p { margin: 0; }
.dst { display: flex; flex-direction: column; gap: 2px; }
.dst span { display: grid; grid-template-columns: 48px 1fr; gap: 6px; }
.dst i { font-style: normal; font-weight: 600; text-align: right; }
.dtree { display: flex; flex-direction: column; border-radius: 12px; background: var(--glass-weak); padding: 4px; }
.dn { display: grid; grid-template-columns: 24px 64px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 8px 8px calc(8px + var(--ind, 0px)); border-radius: 10px; }
.dn.grp { grid-template-columns: 64px minmax(0, 1fr) auto; font-weight: 600; padding-left: calc(40px + var(--ind, 0px)); }
.dn.grp.top { background: rgba(255,255,255,.55); }
.dn[data-d="1"] { --ind: 14px; } .dn[data-d="2"] { --ind: 28px; } .dn[data-d="3"] { --ind: 42px; } .dn[data-d="4"] { --ind: 56px; } .dn[data-d="5"], .dn[data-d="6"] { --ind: 70px; }
.dn.leaf.on { background: var(--brand-soft); }
.dn.dim { opacity: .45; }
.dn .nr { color: var(--muted); font-size: 12.5px; padding-top: 2px; }
.dn .tx { min-width: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.dn.grp .tx { font-weight: 600; }
.dn .tx .tag { margin-left: 0; margin-right: 4px; }
.dn .dck { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 3px; }
.dn .nv, .dn .pin { white-space: nowrap; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.dn .pin .in { width: 70px; text-align: right; }
.dopts { display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.dop { display: grid; grid-template-columns: 20px 44px minmax(0, 1fr); gap: 6px; padding: 5px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .dop:hover { background: rgba(255,255,255,.7); } }
.dop.on { background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px var(--brand-line); }
.dop input { accent-color: var(--brand); margin-top: 2px; }
.dop .op { font-weight: 600; text-align: right; }
.dog { margin-top: 4px; font-weight: 600; }
.dcalc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.75); font-weight: 400; }
.dcalc .row { align-items: flex-end; }
.dcalc label.f { min-width: 140px; }
.ladder { display: flex; flex-wrap: wrap; gap: 4px; }
.ladder span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--mute-bg); }
.ladder span.hit { background: var(--brand); color: #fff; }
.daudit textarea, .onote textarea { margin-top: 4px; width: 100%; }
.onote { margin: -2px 8px 6px 42px; }
.qrow { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.qbar { position: relative; height: 10px; border-radius: 5px; background: rgba(28,43,39,.08); }
.qbar > span { display: block; height: 100%; border-radius: 5px; background: var(--qc, var(--brand)); width: 0; }
.qbar > i { position: absolute; top: -4px; width: 2px; height: 18px; background: var(--ink); margin-left: -1px; }
.qbar.q1 { --qc: #4CAE49; } .qbar.q2 { --qc: #29538D; } .qbar.q3 { --qc: #89AA34; } .qbar.q4 { --qc: #1FA4D9; } .qbar.q5 { --qc: #6660AA; } .qbar.q6 { --qc: #039AAA; }
.scale.dg { background: linear-gradient(90deg, rgba(28,43,39,.08) 0 50%, rgba(160,167,163,.45) 50% 65%, rgba(214,175,54,.45) 65% 80%, rgba(120,140,160,.5) 80% 100%); margin-top: 6px; }
td.up { color: var(--ok); font-weight: 600; } td.down { color: var(--crit); font-weight: 600; }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--brand-line); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 760px) {
  .dcrit > summary { grid-template-columns: 1fr; gap: 4px; padding: 10px 14px; }
  .dcrit .dv .bar { width: 64px; }
  .dbody { padding: 6px 12px 14px; }
  .dn { grid-template-columns: 22px minmax(0, 1fr); padding-left: calc(6px + var(--ind, 0px) / 2); }
  .dn .nr { grid-column: 2; }
  .dn .tx { grid-column: 1 / -1; }
  .dn .pin { grid-column: 1 / -1; justify-content: flex-end; }
  .dn.grp { grid-template-columns: minmax(0, 1fr) auto; padding-left: calc(6px + var(--ind, 0px) / 2); }
  .dn.grp .nr { grid-column: 1; } .dn.grp .tx { grid-column: 1 / -1; } .dn.grp .nv { grid-column: 2; grid-row: 1; }
  .onote { margin-left: 8px; }
  .qrow { grid-template-columns: 1fr; gap: 4px; }
}
.kpi .chip { white-space: normal; }
@media (max-width: 760px) { .scale-l .lw { display: none; } }

/* Arbeitsbereiche BiRN | DGNB und Plattform-Verwaltung (Etappe 8) ------------------------- */
body[data-ws="dgnb"] {
  --brand: #24578A; --brand-dark: #173D63; --brand-soft: rgba(36,87,138,.10); --brand-line: rgba(36,87,138,.30);
  --lichen: #BACDE4; --sky: #C9DCCB; --side: rgba(16,30,50,.88); --side-hover: rgba(255,255,255,.08);
}
body[data-ws="dgnb"] .brand svg rect { fill: #3F7FC4; }
.ws-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 3px; margin: 0 8px; border-radius: 11px; background: rgba(255,255,255,.08); }
.ws-switch button { border: 0; background: transparent; color: var(--side-text); padding: 7px 10px; border-radius: 8px; font-weight: 650; font-size: 13px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ws-switch button:hover { background: rgba(255,255,255,.08); color: #fff; } }
.ws-switch button.on { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ws-tag { display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
          color: var(--brand-dark); background: var(--brand-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
#support-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 20px;
               background: #8A4B06; color: #fff; font-size: 13.5px; }
#support-bar .btn { background: #fff; color: #5A3104; border: 0; }
tr.dimrow { opacity: .6; }
.pick-offices { max-height: 180px; overflow: auto; padding: 4px 2px; }
.row.tight { gap: 4px; }
@media (max-width: 900px) { .ws-switch { margin: 8px 0 0; } }
@media (max-width: 900px) { .side:not(.open) .ws-switch { display: none; } #support-bar { position: static; padding: 8px 16px; } }

/* Bauprodukte & Nachweise (Etappe 9) --------------------------------------------------------- */
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.plain li { font-size: 13.5px; }
.split.mat-split { grid-template-columns: minmax(0, 1fr) 360px; }
.scope-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--hair-2); }
.scope-row .check { flex: 1 1 auto; min-width: 0; }
.scope-row .check .hint { display: block; font-weight: 400; }
.scope-row select.in.small { width: 132px; }
.bulk { padding: 10px 14px; border-radius: var(--r); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.bulk select.in.small { width: 150px; }
th.chk, td.chk { width: 36px; }
.rrow { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--hair-2); }
.rrow .rhead { font-size: 14px; }
.rrow .rhead .mono { margin-right: 4px; }
.rrow select.in.small { width: 132px; }
.rrow input.in.small { width: 100%; min-width: 160px; }
.rrow details.rreq { padding: 2px 0; }
.rrow details.rreq p { margin: 4px 0 0; }
select.res-erfuellt { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
select.res-nicht_erfuellt { background: var(--crit-bg); color: var(--crit); font-weight: 600; }
select.res-ausnahme { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
ul.docs li { padding-bottom: 8px; border-bottom: 1px solid var(--hair-2); }
ul.docs a { font-weight: 600; word-break: break-word; }
ul.docs select.in.small { width: 170px; }
ul.docs input[type=date].in.small { width: 140px; }
.note.info-n { background: var(--info-bg); color: var(--ink); }
.crit-t { color: var(--crit); }
.exp h3 { font-size: 15px; }
.pre { white-space: pre-line; }
.lib-det { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 6px 4px 12px; }
.lib-det h3 { font-size: 13.5px; }
.lib-det select.in.small { width: 170px; }
.src-row { gap: 6px; }
.firm-page { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
.firm-page .brand.plain { display: flex; gap: 10px; align-items: center; color: var(--ink); }
.firm-page .brand.plain b { display: block; } .firm-page .brand.plain span { color: var(--muted); font-size: 13px; }
.firm-page h1 { margin: 6px 0 0; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
details.req summary { cursor: pointer; }
details.req p { margin: 6px 0 0; }
@media (max-width: 1100px) { .split.mat-split { grid-template-columns: minmax(0, 1fr); } .lib-det { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .scope-row { flex-wrap: wrap; } .scope-row select.in.small, .rrow select.in.small, ul.docs select.in.small, .bulk select.in.small { width: 100%; } .firm-page { padding: 16px 12px 40px; } }
select[data-lvtrade].in.small { width: 210px; max-width: 100%; }
select[data-radd].in.small { width: 320px; max-width: 100%; }
#up select.in.small { width: 170px; } #up input[type=date].in.small { width: 150px; }
@media (max-width: 760px) {
  .tbl table.cards td.mini { display: inline-block; width: auto; min-width: 74px; vertical-align: top; }
  .tbl table.cards td.chk { float: right; width: auto; }
  .tbl table.cards td.chk::before { display: none !important; }
}
/* Nachweisprüfung (Etappe 10) */
.ck { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.ck.ok { background: var(--ok-bg); color: var(--ok); } .ck.crit { background: var(--crit-bg); color: var(--crit); } .ck.mute { background: var(--mute-bg); color: var(--muted); }
.ckrow { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; margin-top: 4px; }
ul.checks > li { padding: 8px 0; border-bottom: 1px solid var(--hair-2); }
.warn-t { color: var(--warn); }
.btn.sugg { box-shadow: 0 0 0 2px var(--brand-line); }
section.review { box-shadow: inset 0 0 0 1.5px var(--brand-line); }
ul.hist li { font-size: 13px; }
textarea.mono-s { font-family: var(--mono); font-size: 12.5px; }
/* Positivliste und Prüfmodus (Etappe 11) */
.pos-box { box-shadow: inset 0 0 0 1px var(--hair); }
.pos-box.ok { box-shadow: inset 0 0 0 1.5px rgba(47,125,79,.45); } .pos-box.warn { box-shadow: inset 0 0 0 1.5px var(--crit-bg); }
.pos-box .ckrow { margin-top: 0; }
.pos-det ul.plain li { padding: 4px 0; }
.pos-set summary { cursor: pointer; list-style-position: outside; }
.pos-set form { margin-top: 12px; }
.pos-set input[type=number] { width: 110px; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 5px; background: rgba(28,43,39,.08); box-shadow: inset 0 -1px 0 rgba(28,43,39,.18);
      font: 600 11.5px/18px var(--mono); color: var(--ink-2); text-align: center; }
.btn.pri kbd { background: rgba(255,255,255,.22); color: inherit; box-shadow: none; }
body.rvm-on { overflow: hidden; }
.rvm { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: rgba(230,236,233,.97);
       backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%); outline: none; }
.rvm-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 24px 12px;
         border-bottom: 1px solid var(--hair); }
.rvm-h h2 { font-size: 19px; } .rvm-h h2 .sub { font-weight: 400; margin-left: 6px; }
.rvm-b { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); }
.rvm-doc { min-height: 0; overflow: auto; padding: 16px 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.rvm-tabs .btn.on { background: #fff; color: var(--brand-dark); box-shadow: 0 0 0 2px var(--brand-line); }
.rvm-page { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.rvm-page img { display: block; width: 100%; height: auto; }
.rvm-side { min-height: 0; overflow: auto; padding: 16px 24px 24px 16px; background: var(--glass-weak); border-left: 1px solid var(--hair); }
.rvm-dec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; position: sticky; bottom: 0; padding: 12px 0 4px;
           background: linear-gradient(to bottom, transparent, rgba(236,241,238,.96) 18%); }
.rvm-dec .btn { justify-content: flex-start; gap: 8px; }
.rvm-keys { max-width: none; }
@media (max-width: 900px) {
  .rvm-b { grid-template-columns: 1fr; overflow: auto; }
  .rvm-doc, .rvm-side { overflow: visible; padding: 12px 16px; border-left: 0; }
  .rvm-h { padding: 12px 16px; }
  .rvm-keys { display: none; }
}
/* DGNB-Nachweise wie DGNB Software (Etappe 12) */
.dside { gap: 6px; }
.tag-btn { border: 0; background: var(--mute-bg); color: var(--ink-2); font: 600 12px/1.6 var(--font); padding: 1px 8px; border-radius: 6px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .tag-btn:hover { background: var(--brand-soft); color: var(--brand-dark); } }
.dev { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hair); }
.dev h3 { font-size: 15px; }
.dev-slot { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--glass-weak);
            box-shadow: inset 0 0 0 1px var(--hair); scroll-margin-top: calc(var(--sticky-top) + 16px); }
.dev-slot.erlaeuterung { box-shadow: inset 0 0 0 1px var(--brand-line); }
.dev-slot.fotos { border-left-color: rgba(31,164,217,.45); }
.dev-slot h4 { margin: 0; font-size: 14px; font-weight: 650; }
.dev-tx { font-size: 13.5px; line-height: 1.5; min-height: 64px; }
.dev-items { display: flex; flex-direction: column; gap: 6px; }
.dev-it { display: flex; gap: 12px; align-items: flex-start; padding: 8px; border-radius: var(--r-sm); background: rgba(255,255,255,.6); }
.dev-th { flex: 0 0 auto; border: 0; padding: 0; background: #fff; border-radius: 6px; cursor: zoom-in; box-shadow: 0 0 0 1px var(--hair); }
.dev-th img { display: block; width: 132px; height: 92px; object-fit: contain; border-radius: 6px; }
.dev-ex summary { cursor: pointer; }
.dev-links { gap: 6px; }
.grow { flex: 1 1 auto; min-width: 0; }
dialog.pdlg .pv-wrap { max-height: calc(100vh - 340px); overflow: auto; background: rgba(28,43,39,.05); border-radius: var(--r); padding: 10px; }
.pv { position: relative; margin: 0 auto; width: fit-content; max-width: 100%; touch-action: none; user-select: none; }
.pv img { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: var(--shadow); }
.pv.sel-on { cursor: crosshair; }
.pv-sel { position: absolute; border: 2px solid var(--brand); background: rgba(31,107,87,.14); box-shadow: 0 0 0 9999px rgba(19,38,33,.18); pointer-events: none; }
.wheel-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.wheel { width: min(520px, 100%); height: auto; }
.wheel .wseg { cursor: pointer; outline: none; }
.wheel .wseg:hover path:first-of-type, .wheel .wseg:focus path:first-of-type { fill: #D4DDD8; }
.wheel .wlbl { font: 600 9.5px var(--font); fill: var(--ink-2); text-anchor: middle; dominant-baseline: middle; }
.wheel .wtot { font: 700 30px var(--font-d); fill: var(--ink); text-anchor: middle; }
.wheel .wsub { font: 500 11px var(--font); fill: var(--muted); text-anchor: middle; }
.wleg li { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 13.5px; }
.wdot { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.wdot[data-qc="0"] { background: #4CAE49; } .wdot[data-qc="1"] { background: #29538D; } .wdot[data-qc="2"] { background: #89AA34; }
.wdot[data-qc="3"] { background: #1FA4D9; } .wdot[data-qc="4"] { background: #6660AA; } .wdot[data-qc="5"] { background: #039AAA; }
@media (max-width: 760px) { .dev-it { flex-wrap: wrap; } .dev-th img { width: 100%; height: 140px; } .dev-slot { padding: 12px; } }
details.dev-slot > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
details.dev-slot > summary::-webkit-details-marker { display: none; }
details.dev-slot > summary::before { content: "›"; font-weight: 700; color: var(--muted); transition: transform 200ms var(--ease-out); margin-top: 1px; }
details.dev-slot[open] > summary::before { transform: rotate(90deg); }
.dev-t { font-size: 14px; }
.dev-b { margin-top: 10px; }
dialog.pdlg .pv-wrap { max-height: calc(100vh - 430px); min-height: 240px; }
/* Nachweisfelder je Indikator: Soll/Ist, Bildvergleich, Suche im Nachweis (Etappe 13) */
.dev-inline { margin: 6px 0 10px; padding: 10px 10px 4px; border-top: 0; border-radius: var(--r); background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px var(--hair); }
.dtree .dev-host:empty { display: none; }
.ind .dev-host { padding: 0 12px 10px; } .ind .dev-host:empty { display: none; }
.in.xs { min-height: 28px; padding: 3px 6px; width: 84px; font-size: 13px; }
.nowrap { white-space: nowrap; }
.dev-vals .tbl { margin: 0; }
table.vt { font-size: 13px; } table.vt td, table.vt th { padding: 5px 8px; vertical-align: middle; } table.vt td:first-child { min-width: 190px; }
.dev-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev-col { padding: 10px; border-radius: var(--r-sm); background: rgba(255,255,255,.6); min-width: 0; }
.dev-fig { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dev-th.dev-big { display: block; width: 100%; height: auto; margin: 0; } .dev-th.dev-big img { width: 100%; height: 170px; }
.empty.sm { padding: 10px; font-size: 13px; }
.pv-find { margin: 4px 0; } .pv-find .in { min-width: 220px; }
.pv-hits { display: flex; flex-direction: column; gap: 2px; max-height: 120px; overflow: auto; }
.pv-hits:empty { display: none; }
.pv-hit { text-align: left; border: 0; background: transparent; padding: 3px 8px; border-radius: 6px; font: 13px/1.4 var(--font); color: var(--ink-2); cursor: pointer; }
.pv-hit:hover, .pv-hit.on { background: var(--brand-soft); color: var(--brand-dark); }
.sg { padding: 8px; border-radius: var(--r-sm); background: var(--glass-weak); align-items: flex-start; }
.sg input[type=checkbox] { margin-top: 3px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .dev-pair { grid-template-columns: 1fr; } table.vt td:first-child { min-width: 140px; } .in.xs { width: 72px; } }
/* Zertifizierungsverträge (Etappe 13) */
.ct-title { font: 650 20px/1.3 var(--font-d); min-width: min(520px, 100%); }
.ct-chs { gap: 8px; }
.ct-ch { border-radius: var(--r); background: var(--glass-weak); padding: 10px 14px; }
.ct-ch.off { opacity: .62; }
.ct-ch > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; }
.ct-ch > summary::-webkit-details-marker { display: none; }
.ct-ch > summary::before { content: "›"; font-weight: 700; color: var(--muted); transition: transform 200ms var(--ease-out); }
.ct-ch[open] > summary::before { transform: rotate(90deg); }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 10px; }
.ct-tx { font: 13px/1.5 var(--mono); }
.ct-prev { background: #fff; border-radius: var(--r-sm); padding: 14px 18px; box-shadow: 0 0 0 1px var(--hair); font-size: 13.5px; line-height: 1.5;
           max-height: 560px; overflow: auto; color: var(--ink); }
.ct-prev h4 { margin: 0 0 8px; font-size: 14.5px; color: var(--brand-dark); }
.ct-prev p { margin: 0 0 3px; }
.ct-gap { height: 8px; }
.ct-v { background: var(--ok-bg); border-radius: 3px; padding: 0 2px; }
mark.ct-miss { background: var(--warn-bg); color: var(--warn); border-radius: 3px; padding: 0 3px; font-weight: 600; }
.ct-mark { margin: 6px 0; padding: 8px 10px; border: 1px dashed var(--brand-line); border-radius: var(--r-sm); color: var(--brand-dark); font-size: 12.5px; }
.ct-pal summary { cursor: pointer; }
.ct-fee table.ed td { vertical-align: top; }
.ct-fee table.ed td .in + .in { margin-top: 4px; }
@media (max-width: 900px) { .ct-grid { grid-template-columns: 1fr; } .ct-title { min-width: 0; width: 100%; } }
.ct-fee table.ed td:first-child { min-width: 0; }
.ct-fee table.ed td .in:not(.xs):not(.small) { width: 100%; min-width: 180px; }
.ct-fee .icon-btn { min-width: 30px; }
.ct-fee table.ed td.w { width: 100%; } .ct-fee .in.ct-pos { width: 48px; }
/* Verträge (Etappe 14): hervorgehobene Platzhalter im Editor, variable Angaben, Unterschrift */
mark.t-ph { background: rgba(31,107,87,.15); color: var(--brand-dark); border-radius: 3px; box-shadow: 0 0 0 1px rgba(31,107,87,.15); }
select[data-fsel="signer"] { min-width: 220px; }
mark.t-mk { background: var(--warn-bg); color: var(--warn); border-radius: 3px; box-shadow: 0 0 0 1px var(--warn-bg); }
.ct-hl { position: relative; border-radius: 10px; background: rgba(255,255,255,.78); }
.ct-hl:focus-within { background: #fff; }
.ct-hl-bg, .ct-hl textarea.ct-tx { font: 13px/1.5 var(--mono); padding: 9px 12px; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
  letter-spacing: 0; tab-size: 4; scrollbar-gutter: stable; }
.ct-hl-bg { position: absolute; inset: 0; overflow: hidden; color: transparent; pointer-events: none; border-radius: 10px; }
.ct-hl-bg mark { color: transparent; }
.ct-hl textarea.ct-tx { position: relative; display: block; width: 100%; background: transparent; caret-color: var(--ink); }
.ct-hl textarea.ct-tx:focus { background: transparent; }
.ct-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0; }
.ct-kvi { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; border-radius: var(--r-sm); padding: 8px 11px; cursor: pointer;
  background: var(--ok-bg); color: var(--ink); font: inherit; min-width: 0; transition: box-shadow var(--t-fast) ease; }
.ct-kvi:hover, .ct-kvi:focus-visible { box-shadow: inset 0 0 0 1.5px var(--brand-line); outline: none; }
.ct-kvi dt { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.ct-kvi dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ok); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.ct-kvi.open { background: var(--warn-bg); }
.ct-kvi.open dd { color: var(--warn); }
.ct-prev [data-k].flash { animation: flash 1.4s ease-out; }
.sig-prev { display: block; max-height: 64px; max-width: 260px; object-fit: contain; background: #fff; padding: 6px 10px; border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--hair); }
/* Sprungziele aus der Prüfung (Etappe 14) */
.finding-msg { color: var(--ink); text-decoration: none; }
.finding-msg:hover { text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; }
.finding-msg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.fokus-hit { animation: fokus-hit 2.4s ease-out; scroll-margin: calc(var(--sticky-top) + 96px) 0 96px; }
@keyframes fokus-hit { 0%, 45% { background-color: rgba(31,107,87,.13); box-shadow: 0 0 0 3px var(--brand-line); }
  100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .fokus-hit { animation-duration: .01s; outline: 3px solid var(--brand-line); } }
/* Datenblätter per Drag & Drop (Bauprodukte, Etappe 14) */
.fdrop { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r); cursor: pointer;
  background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand-line); transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.fdrop:hover, .fdrop:focus-visible { background: rgba(31,107,87,.14); outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.fdrop.over { background: rgba(31,107,87,.2); box-shadow: inset 0 0 0 2px var(--brand); }
.fdrop-t b { color: var(--brand-dark); }
.fdrop-list { display: flex; flex-direction: column; gap: 6px; cursor: default; }
.fdrop-list:empty { display: none; }
.fdrop-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(255,255,255,.85); }
.fdrop-name { font-weight: 600; font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.fdrop-match:not([hidden]) { margin: 2px 0; }
.in.auto-filled { background: var(--ok-bg); box-shadow: inset 0 0 0 1px rgba(47,125,79,.35); }
.fdrop-item select.in { min-width: min(250px, 100%); max-width: 100%; }
/* Menü nach Steckbriefen (Etappe 15) */
.nav a.nav-grp, .nav span.nav-grp { font-size: 13px; padding: 6px 12px 2px; color: var(--side-muted); font-weight: 600; }
.nav a.nav-grp:hover { color: #fff; }
.nav a.nav-grp.on { background: transparent; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.nav a.nav-sub { padding-left: 26px; font-size: 13.5px; position: relative; }
.nav a.nav-sub::before { content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 1px; background: rgba(255,255,255,.22); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tool-link { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink);
  background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); transition: box-shadow var(--t-fast) ease; }
.tool-link:hover, .tool-link:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); outline: none; }
.tool-link b { color: var(--brand-dark); }
@media (max-width: 900px) {
  .nav .head { display: block; padding: 14px 12px 4px; }
  .nav a.nav-grp { min-height: 36px; }
}
.ind-com { margin: 0 14px 12px; } .ind-com textarea { min-height: 2.6em; }
/* Nachweisbereiche vereinfacht (Etappe 15) */
.dev-need { margin: 0; font-size: 13px; color: var(--ink-2); background: var(--brand-soft); border-radius: var(--r-sm); padding: 8px 10px; }
.dev-need b { color: var(--brand-dark); font-weight: 600; }
.dev-actions { padding-top: 4px; border-top: 1px solid var(--hair); }
.dev-actions .menu { left: 0; right: auto; }
.dev-items .row-menu .menu { right: 0; }
.dev-actions .menu { top: auto; bottom: calc(100% + 4px); }

/* Bewegung und Zielgrößen (Etappe 17) -------------------------------------------------------------
   Grundsätze: Rückmeldung beim Drücken, Menüs wachsen aus ihrem Auslöser, nichts erscheint aus dem Nichts,
   häufige Aktionen (Reiter, Navigation, Tastatur) bleiben ohne Animation, alles unter 300 ms. */
/* Drücken: jede Schaltfläche bestätigt den Klick sofort */
.icon-btn, .seg button, .tabs a, .tabs button, .pill-btn, .block-btn, .tag-btn, .menu-btn, .ws-switch button, .tgl {
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.icon-btn:active, .seg button:active, .tabs a:active, .tabs button:active, .pill-btn:active, .block-btn:active, .tag-btn:active,
.menu-btn:active, .ws-switch button:active, .tgl:active, summary.btn:active { transform: scale(.96); }
.tool-link, .fdrop { transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.tool-link:active, .fdrop:active { transform: scale(.985); }
.menu button:active, .menu label:active, .menu a:active { background: rgba(31,107,87,.16); }

/* Menüs: aus dem Auslöser heraus (rechts oben, bei linksbündigen links, bei aufwärts öffnenden unten) */
.row-menu[open] > .menu { animation: pop-in var(--t-pop) var(--ease-out); transform-origin: top right; }
.ph-menu[open] > .menu { transform-origin: top left; }
.dev-actions .row-menu[open] > .menu { transform-origin: bottom left; }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } }
.row-menu[open] > summary.btn { background: #fff; box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand-dark); }

/* Meldungen: kommen von unten, gehen nach unten (gleicher Weg), Ausgang schneller als Eingang */
.toast { transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out); cursor: default; }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.out { opacity: 0; transform: translateY(8px) scale(.98); transition-duration: 160ms; }

/* Handy-Menü: klappt kurz von oben auf */
@media (max-width: 900px) { .side.open .nav, .side.open .who { animation: nav-in 180ms var(--ease-drawer); } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } }

/* Arbeitet: nach 300 ms ohne Antwort zeigt die gedrückte Schaltfläche einen schnellen Kreisel (Doherty-Schwelle) */
.btn.busy, .icon-btn.busy { pointer-events: none; cursor: progress; }
.btn.busy::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .6s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Größere Trefferflächen ohne optische Änderung (Fitts): unsichtbarer Rand um kleine Ziele */
.btn.sm, .icon-btn, .pill-btn, .block-btn, .tag-btn, .seg button, .tabs a, .tabs button { position: relative; }
.btn.sm::after, .icon-btn::after, .pill-btn::after, .block-btn::after, .tag-btn::after { content: ""; position: absolute; inset: -4px -3px; }
.seg button::after { content: ""; position: absolute; inset: -4px 0; }  /* nur nach oben/unten: Nachbarn liegen dicht */
.crumbs a, .finding-msg, .link { padding-block: 6px; margin-block: -6px; }

@media (prefers-reduced-motion: reduce) {
  dialog[open], .row-menu[open] > .menu, .side.open .nav, .side.open .who { animation-name: fade-in; }
  .toast, .toast.out { transform: none; }
  @starting-style { .toast { transform: none; } }
  .skel { animation: none; }
  .btn.busy::before { animation-duration: 1.6s; }
}

/* Handy (Etappe 18) ---------------------------------------------------------------------------------
   iPhone & Co.: Daumen statt Maus. Untere Leiste für die vier häufigsten Ziele, Dialoge als Blatt von unten,
   Eingaben in 16 px (sonst zoomt iOS beim Antippen), Ziele mindestens 44 px, Ränder für Notch und Home-Leiste. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, summary, label, select, .btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tabbar { display: none; }

@media (pointer: coarse), (max-width: 900px) {
  .in, .in.xs, .in.small, input.in, select.in, textarea.in, .side select, .dn .pin .in { font-size: 16px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  details > summary.row, .dcrit > summary, details.dev-slot > summary, .ct-ch > summary, details > summary:has(h2), details > summary:has(h3) { min-height: 44px; }
  .menu button, .menu a, .menu label { min-height: 44px; }
  .finding-msg, .crumbs a, .link { padding-block: 10px; margin-block: -10px; }
  .crit-links a { padding-block: 9px; }
  .topic input[type=checkbox], .dn .dck, input.dck { width: 24px; height: 24px; }
  .jump .pill-btn, .in.xs { min-height: 40px; }
  .onote > summary, .dhelp > summary, .daudit > summary, .t-det > summary { position: relative; }
  .onote > summary::after, .dhelp > summary::after, .daudit > summary::after, .t-det > summary::after { content: ""; position: absolute; inset: -11px 0; }
  .btn.sm::after, .icon-btn::after, .pill-btn::after, .block-btn::after, .tag-btn::after { inset: -10px -3px; }
}

@media (max-width: 900px) {
  .side { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .side.open { max-height: 100dvh; overscroll-behavior: contain; }
  .main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
          padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

  /* Untere Leiste */
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: rgba(247,250,248,.92); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 -1px 0 var(--hair), 0 -8px 24px -12px rgba(20,40,34,.18); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 4px 2px;
    border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
    transition: color var(--t-fast) ease, background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.on { color: var(--brand-dark); background: var(--brand-soft); }
  .tabbar a:active { transform: scale(.94); }
  .side.open ~ .tabbar { display: none; }      /* offenes Menü: Leiste weg, damit nichts doppelt ist */

  /* Meldungen über der Leiste, volle Breite */
  #toasts { left: 12px; right: 12px; max-width: none; bottom: calc(76px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }

  /* Überläufe */
  .chip { white-space: normal; max-width: 100%; }
  .row.between > .stack, .row > .stack { min-width: 0; }
  .row.between > .btn, .row.between > .actions { flex: 0 0 auto; }
  .seg { display: flex; flex-wrap: wrap; max-width: 100%; }
  .seg button { flex: 1 1 auto; }
  .finding { grid-template-columns: 24px minmax(0, 1fr); }
  .finding > .row { grid-column: 2; flex-wrap: wrap; }
  .tbl table.cards td.r, .tbl table.cards th.r { text-align: left; }
  .jump { top: calc(var(--sticky-top) + 8px); }
}

/* Dialoge auf dem Handy als Blatt von unten: Daumen erreichen die Schaltflächen, Inhalt rollt, Schaltflächen bleiben sichtbar */
@media (max-width: 640px) {
  dialog, dialog.wide, dialog.xwide { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; border-radius: 22px 22px 0 0; overflow: auto; }
  dialog[open] { animation: sheet-in 280ms var(--ease-drawer); }
  dialog form.dlg { padding: 10px 18px 0; gap: 14px; }
  dialog form.dlg::before { content: ""; align-self: center; width: 38px; height: 5px; border-radius: 3px; background: rgba(28,43,39,.18); margin-bottom: 4px; }
  .dlg-actions { position: sticky; bottom: 0; margin: 0 -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(250,252,251,0), rgba(250,252,251,.96) 30%); }
  .dlg-actions .btn { flex: 1 1 0; min-height: 46px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@keyframes sheet-in { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) { dialog[open] { animation-name: fade-in; } .tabbar a:active { transform: none; } }
@media print { .tabbar { display: none !important; } }

/* Paket B: Übersicht „Auf Mindestanforderung setzen“ – kompakt, ohne seitlichen Überlauf auf dem Handy */
table.mini { font-size: 14px; }
table.mini td, table.mini th { padding: 8px 10px; vertical-align: top; }
table.mini td.num { white-space: nowrap; width: 1%; }
table.mini details { margin-top: 4px; }
table.mini details summary { cursor: pointer; min-height: 24px; }
table.mini details ul { margin: 4px 0 0; padding-left: 18px; }
[data-autofocus]:focus { outline: none; }

/* Paket C: Navigation in den Steckbriefen – Inhalt (rechts, ab 1440 px als Spalte, sonst als Leiste), Blättern, Brotkrumen */
.sb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.sb-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sbnav { position: fixed; z-index: 40; top: 12px; right: 12px; bottom: 12px; width: min(340px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 10px; border-radius: var(--r-lg);
  background: var(--glass-strong); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow); }
.sbnav[hidden] { display: none; }
@media (min-width: 1440px) {
  .sb-layout:has(.sbnav:not([hidden])) { grid-template-columns: minmax(0, 1fr) 300px; }
  .sbnav { position: sticky; top: calc(var(--sticky-top) + 16px); right: auto; bottom: auto; width: auto; max-height: calc(100vh - var(--sticky-top) - 32px); z-index: 1; }
  .sbnav [data-nav=close] { display: none; }
}
.sbnav-h { display: flex; gap: 6px; align-items: center; }
.sbnav-h .in { flex: 1; min-width: 0; }
.sbnav > .hint { margin: 0 2px; }
.sbnav kbd { font: 600 11px/1 var(--mono); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--hair-2); background: rgba(255,255,255,.7); }
.sbnav-list { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.sbnav details { border-top: 1px solid var(--hair); }
.sbnav details:first-child { border-top: 0; }
.sbnav summary { display: flex; justify-content: space-between; gap: 8px; padding: 9px 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.sbnav ol { list-style: none; margin: 0; padding: 0 0 6px; }
.sbnav details ol li { padding: 0; border-radius: 0; counter-increment: none; background: none; }
.sbnav li a { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; gap: 6px; align-items: baseline; padding: 6px 6px;
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.35; }
.sbnav li a:hover { background: rgba(255,255,255,.65); }
.sbnav li.on > a { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.sbnav .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbnav li.on > a .nm { white-space: normal; }
.sbnav .mono { font-size: 12px; }
.sbnav .inds { padding: 2px 0 4px 18px; }
.sbnav .inds a { font-size: 12.5px; padding-block: 5px; }
.sbnav-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; border-top: 1px solid var(--hair); padding-top: 8px; font-size: 11.5px; }
.st { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 700 11px/1 var(--font); align-self: center; }
.st-offen { background: var(--mute-bg); color: var(--muted); }
.st-punkte { background: var(--info-bg); color: var(--info); }
.st-fehlt { background: var(--warn-bg); color: var(--warn); }
.st-voll { background: var(--ok-bg); color: var(--ok); }
.st-unter { background: var(--crit-bg); color: var(--crit); }
.st-na { background: transparent; color: var(--faint); border: 1px dashed var(--hair-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: var(--glass-weak); border: 1px solid var(--glass-edge); min-width: 0; transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease; }
.pager a:hover { background: var(--glass); }
.pager a:active { transform: scale(.98); }
.pager .pg-next { text-align: right; align-items: flex-end; }
.pager .pg-t { font-weight: 600; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
nav.crumbs .link { font-size: inherit; color: var(--muted); }
nav.crumbs .crumb-back { margin-left: auto; font-weight: 600; color: var(--brand); }
@media (max-width: 720px) {
  .sbnav { z-index: 60; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .pager { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pager a { padding: 10px 12px; }
  .pager .pg-t { font-size: 13px; }
  nav.crumbs .crumb-back { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .pager a { transition: none; } }

/* Paket E: Schalter Dokumentationsmodus, Liste der Lücken, Pflicht-Kennzeichen */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 32px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 34px; height: 20px; border-radius: 999px; background: var(--hair-2); position: relative; flex: 0 0 auto;
  transition: background-color var(--t-fast) ease; }
.switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--t-fast) var(--ease-out); }
.switch input:checked + .sw { background: var(--brand); }
.switch input:checked + .sw::after { transform: translateX(14px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch .sw, .switch .sw::after { transition: none; } }
ul.doc-gaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
ul.doc-gaps li { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.req-mark { font-size: 11px; font-weight: 700; color: var(--warn); margin-left: 6px; text-transform: uppercase; letter-spacing: .03em; }
.doc-help { display: flex; flex-direction: column; gap: 6px; }
.doc-help .pill-btn { font-size: 12.5px; }
details.doc-gaps-d > summary { cursor: pointer; list-style: none; gap: 8px; }
details.doc-gaps-d > summary::-webkit-details-marker { display: none; }
details.doc-gaps-d[open] > summary .sub { display: none; }
details.doc-gaps-d > .stack { margin-top: 12px; }

/* Paket F: Meldung mit Aktion („Rückgängig“), Einträge mit sichtbaren Aktionen, Ziehen zum Ordnen, Direktbearbeitung */
.toast.has-act { display: flex; align-items: center; gap: 14px; }
.toast-act { border: 0; background: rgba(255,255,255,.16); color: inherit; font: 600 13px/1 var(--font); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.toast-act:hover { background: rgba(255,255,255,.26); }
.dev-it { position: relative; }
.dev-it.dragging { opacity: .45; }
.dev-it.drop-before { box-shadow: 0 -2px 0 var(--brand); }
.dev-it.drop-after { box-shadow: 0 2px 0 var(--brand); }
.it-grip { cursor: grab; color: var(--faint); touch-action: none; }
.it-grip:active { cursor: grabbing; }
.it-acts { display: inline-flex; gap: 2px; }
.it-acts .icon-btn svg, .it-grip svg { width: 16px; height: 16px; }
.it-acts .icon-btn.danger:hover { background: var(--crit-bg); color: var(--crit); }
button.inl { border: 0; background: none; padding: 2px 4px; margin: -2px -4px; border-radius: 6px; font: inherit; color: inherit; text-align: left; cursor: text; }
button.inl:hover { background: var(--brand-soft); }
button.inl b { font-weight: 650; }
input.inl-in { font: inherit; padding: 3px 6px; border: 1px solid var(--brand-line); border-radius: 6px; min-width: 12ch; width: min(100%, 36ch); }
@media (pointer: coarse) { .it-acts .icon-btn { width: 40px; height: 40px; } }
button.inl.sub { color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px), (pointer: coarse) { .it-grip { display: none; } }

/* Paket G: Bildkacheln für die Zeilen des Anhangs 313 (Bild oben, Text darunter, deutliche Auswahl) */
.tiles { display: flex; flex-direction: column; gap: 10px; }
.tiles-g { margin: 6px 0 0; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 10px 12px; min-height: 118px;
  border: 1.5px solid var(--hair-2); border-radius: var(--r); background: rgba(255,255,255,.75); color: var(--ink); text-align: left; cursor: pointer;
  font: inherit; transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.tile:hover { border-color: var(--brand-line); background: #fff; }
.tile:active { transform: scale(.98); }
.tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tile-ic { display: block; width: 34px; height: 34px; color: var(--brand); }
.tile-ic svg { width: 100%; height: 100%; }
.tile-code { font-size: 11.5px; color: var(--muted); }
.tile-t { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile.rel { background: var(--brand-soft); border-color: var(--brand-line); }
.tile-rel { font-size: 10.5px; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .03em; margin-top: auto; }
.tile-ck { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 700 13px/1 var(--font); color: #fff; background: var(--brand); opacity: 0; transform: scale(.85); transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--ease-out); }
.tile.on { border-color: var(--brand); box-shadow: 0 0 0 1.5px var(--brand) inset; background: #fff; }
.tile.on .tile-ck { opacity: 1; transform: none; }
.tile-det:empty { display: none; }
.tile-det details { border-top: 1px solid var(--hair); padding-top: 8px; }
.tile-det p { margin: 4px 0; }
@media (max-width: 720px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .tile, .tile-ck { transition: none; } }
.q-row.rel { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.q-row.rel > summary { grid-template-columns: 52px minmax(0, 1fr) auto; align-items: start; }
.tile-t { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; max-width: 100%; }
/* Firmenformular (Paket H): Ablagefelder je Unterlagenart, Fortschritt */
.fprog { width: 100%; max-width: 420px; height: 6px; accent-color: var(--brand); }
.fprod h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.fz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.fz { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: rgba(255,255,255,.6);
  box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; transition: box-shadow var(--t-fast) ease, background-color var(--t-fast) ease; }
.fz.has { background: var(--ok-bg); box-shadow: inset 0 0 0 1px rgba(47,125,79,.3); }
.fz.over { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.fz-h { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.fz-h .hint { flex-basis: 100%; }
.fz-req { font-size: 12px; font-weight: 600; color: var(--warn); }
.fz.has .fz-req { color: var(--ok); }
.fz-file { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: flex-start; padding: 6px 8px; border-radius: var(--r-sm); background: rgba(255,255,255,.85); }
.fz-ic { flex-shrink: 0; font: 600 10px/1 var(--mono); padding: 4px 5px; border-radius: 4px; background: var(--mute-bg); color: var(--muted); }
.fz-name { flex: 1 1 170px; min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.fz-name .sub { font-weight: 400; }
.fz-drop { display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 44px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand-line); transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.fz-drop b { color: var(--brand-dark); }
.fz-drop:hover, .fz-drop:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.fz-drop:active { transform: scale(.99); }
.fz.has .fz-drop { padding: 8px 12px; } .fz.has .fz-drop .hint { display: none; }
.fz-prog { display: flex; flex-direction: column; gap: 4px; }
.fz-prog progress { width: 100%; height: 6px; accent-color: var(--brand); }
@media print { .firm-page .fz-drop, .firm-page .btn, .firm-page [data-header] { display: none !important; } }
/* Umschalter als Radiogruppe (Paket I/J: „Alle Indikatoren / Nur ausgewählte“) */
.seg label { padding: 7px 14px; min-height: 36px; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 13px;
  border-radius: 8px; color: var(--ink-2); }
.seg label:has(input:checked) { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(20,40,34,.12); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
/* LV-Texte mit Indikatorbezug (Paket J) */
.lv-list { display: flex; flex-direction: column; gap: 14px; max-height: min(60vh, 640px); overflow-y: auto; overscroll-behavior: contain; }
.lv-list[aria-busy=true] { opacity: .55; }
.lvg h3 { margin: 4px 0 6px; font-size: 15px; }
.lvc { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--hair); }
.lvc h4 { margin: 0; font-size: 14px; }
.lvi { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 1px var(--hair); }
.lvi p { margin: 0; flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.lvi .btn { flex-shrink: 0; }
@media (max-width: 560px) { .lvi { flex-direction: column; } }
/* Werkzeug als Aktion (Pakete K/L: Merkblatt erzeugen) */
button.tool-link { border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
button.tool-link:active { transform: scale(.99); }
/* Nachweise im Steckbrief mit Ablagefeld (Paket M) */
.evz-list { gap: 10px; }
.evz-h { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: flex-start; }
.evz-h > .stack { min-width: 0; flex: 1 1 220px; }
.evz-h b { overflow-wrap: anywhere; }
.evz-act .fz-drop { flex: 1 1 220px; }
.evl-list { max-height: min(50vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.evl-row { align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid var(--hair); }
.evl-row span { overflow-wrap: anywhere; }

/* Statusleiste: Gesamterfüllungsgrad und Kriterien, klebt oben im Inhaltsbereich (Höhe als --sbar-h für andere klebende Elemente) */
:root { --sbar-top: 0px; --sbar-h: 0px; --sticky-top: calc(var(--sbar-top) + var(--sbar-h)); }
html { scroll-padding-top: calc(var(--sticky-top) + 12px); }
.shell-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sbar { position: sticky; top: var(--sbar-top); z-index: 25; display: flex; flex-direction: column; gap: 8px; padding: 10px 40px 10px;
  background: var(--glass-strong); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--hair); box-shadow: 0 6px 18px -14px rgba(20,40,34,.45); }
.sbar[hidden] { display: none; }
.sbar.collapsed { padding-top: 6px; padding-bottom: 6px; }
.sbar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; min-width: 0; }
.sbar-total { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.sbar-lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.sbar-val { font: 700 22px/1.1 var(--font-d, inherit); font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.01em; }
.sbar.collapsed .sbar-val { font-size: 17px; }
.sbar-delta { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums;
  animation: sbar-pop 220ms cubic-bezier(.23, 1, .32, 1); }
.sbar-delta.st-up { background: var(--ok-bg); color: var(--ok); } .sbar-delta.st-down { background: var(--crit-bg); color: var(--crit); }
@keyframes sbar-pop { from { opacity: 0; transform: translateY(3px) scale(.96); } to { opacity: 1; transform: none; } }
.sbar-prog { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sbar-track { position: relative; height: 8px; border-radius: 4px; background: var(--mute-bg); }
.sbar.collapsed .sbar-track { height: 6px; }
.sbar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; transition: width 320ms cubic-bezier(.23, 1, .32, 1); }
.sbar-fill.st-ok { background: var(--ok); } .sbar-fill.st-work { background: #C58A2B; }
.sbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink-2); opacity: .3; }
.sbar-mark.goal { opacity: .85; width: 3px; margin-left: -1.5px; }
.sbar-note { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sbar.collapsed .sbar-note { display: none; }
.sbar-ok { color: var(--ok); font-weight: 600; } .sbar-warn { color: var(--crit); font-weight: 600; }
.sbar-set { font-size: 12px; color: var(--muted); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar-tg { margin-left: auto; flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px;
  background: var(--mute-bg); color: var(--ink); cursor: pointer; transition: background-color 150ms ease, transform 120ms ease-out; }
.sbar-tg:hover { background: rgba(28,43,39,.1); } .sbar-tg:active { transform: scale(.95); }
.sbar-tg:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sbar-tg svg { transition: transform 200ms cubic-bezier(.23, 1, .32, 1); } .sbar.collapsed .sbar-tg svg { transform: rotate(180deg); }
.sbar-crit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.sbar-crit[hidden] { display: none; }
.sbar-groups { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1 1 auto; min-width: 0; }
.sbar-grp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sbar-cat { font: 600 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--muted); margin-right: 2px; }
.sbar-pill { display: inline-flex; flex-direction: column; gap: 3px; min-width: 46px; padding: 4px 7px 5px; border-radius: 8px;
  text-decoration: none; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow 150ms ease; }
.sbar-code { font: 600 11px/1 var(--mono); }
.sbar-mini { display: block; height: 3px; border-radius: 2px; background: var(--mute-bg); overflow: hidden; }
.sbar-mini span { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--faint); transition: width 320ms cubic-bezier(.23, 1, .32, 1); }
.sbar-pill.st-ok { background: var(--ok-bg); box-shadow: inset 0 0 0 1px rgba(47,125,79,.28); } .sbar-pill.st-ok .sbar-mini span { background: var(--ok); }
.sbar-pill.st-work { background: var(--warn-bg); box-shadow: inset 0 0 0 1px rgba(183,121,31,.35); } .sbar-pill.st-work .sbar-mini span { background: #C58A2B; }
.sbar-pill.st-open .sbar-code { color: var(--muted); }
.sbar-pill.need { box-shadow: inset 0 0 0 1.5px rgba(154,48,39,.55); } .sbar-pill.need .sbar-code { color: var(--crit); }
.sbar-pill.st-na { opacity: .55; box-shadow: inset 0 0 0 1px var(--hair); background: transparent; }
.sbar-pill:hover, .sbar-pill:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.sbar-pill.here { box-shadow: inset 0 0 0 2px var(--ink); }
.sbar-counts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--muted); }
.sbar-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; }
.sbar-dot.st-ok { background: var(--ok); } .sbar-dot.st-work { background: #C58A2B; }
.sbar-dot.st-open { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(28,43,39,.35); }
@media (max-width: 900px) {
  .sbar { padding: 8px 16px; }
  .sbar-set, .sbar-qng { display: none; }
  .sbar-prog { flex-basis: 100%; order: 3; }
  .sbar.collapsed .sbar-prog { flex: 1 1 120px; order: 0; }
  .sbar.collapsed .sbar-counts { display: none; }
  .sbar-groups { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .sbar-groups::-webkit-scrollbar { display: none; }
  .sbar-grp { flex-wrap: nowrap; }
  .sbar-pill { min-height: 32px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .sbar-fill, .sbar-mini span, .sbar-tg svg { transition: none; } .sbar-delta { animation: none; } }
@media print { .sbar { display: none !important; } }

/* ---------------------------------------------------------------------------------------------------------------
   Matrix-Ansicht „Rechentabelle“ (matrixview.js): Aufbau, Farben und Schrift wie die BiRN-Gewichtungstabelle (Excel).
   Grün = ist einzutragen, Orange = wird automatisch berechnet, Zeilenfarben je Kategorie/Kriterium aus der Tabelle.
   --------------------------------------------------------------------------------------------------------------- */
.sbar-mx { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--brand-line); background: #fff; color: var(--brand-dark); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background-color var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.sbar-mx:hover { background: var(--brand-soft); } .sbar-mx:active { transform: scale(.97); }
.sbar-mx[aria-pressed="true"] { background: #217346; border-color: #217346; color: #fff; }
.sbar-mx:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sbar.collapsed .sbar-mx { height: 28px; }

.mx { --xl-grid: #D4D4D4; --xl-head: #F3F3F3; --xl-sel: #217346; --xl-in: #92D050; --xl-calc: #F79646; --xl-band: #00B0F0; --xl-gray: #D9D9D9;
  --xl-note: #EBF1DE; --xl-na: #9A0000;
  display: flex; flex-direction: column; gap: 14px; padding: 16px 40px 64px; min-width: 0; max-width: 1480px; }
.mx[hidden] { display: none; }
.mx-bar { position: sticky; top: var(--sticky-top); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding: 10px 14px; margin: 0 -14px; border-radius: 12px; background: var(--glass-strong); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--hair); }
.mx-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 280px; }
.mx-title .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.mx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mx-sw { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.25); }
.mx-sw-in { background: var(--xl-in); } .mx-sw-calc { background: var(--xl-calc); } .mx-sw-app { background: repeating-linear-gradient(135deg, #fff 0 3px, #E2EFD9 3px 6px); }
.mx-save { font-size: 12px; color: var(--muted); min-width: 12ch; }
.mx-save.is-bad { color: var(--crit); font-weight: 600; }
.mx-close { display: inline-flex; align-items: center; gap: 6px; }

/* Kopf wie Zeilen 39–45 der Tabelle (blaues Band, orange Ergebnisse) und Netzdiagramm */
.mx-top { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: flex-start; }
.mx-head { border-collapse: collapse; font: 13px/1.35 Arial, 'Liberation Sans', Helvetica, sans-serif; flex: 1 1 460px; min-width: 0; }
.mx-head th, .mx-head td { border: 1px solid #fff; padding: 9px 12px; text-align: left; vertical-align: middle; }
.mx-band { background: var(--xl-band); color: #000; font-weight: 700; }
.mx-head .mx-min { font-weight: 700; font-size: 12px; white-space: nowrap; }
.mx-calc { background: var(--xl-calc); color: #000; font-weight: 700; font-variant-numeric: tabular-nums; }
.mx-big { font-size: 18px; min-width: 9ch; }
.mx-cats { background: var(--xl-head); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0 !important; }
.mx-catv { font-variant-numeric: tabular-nums; } .mx-catv b { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mx-fig { margin: 0; flex: 0 1 300px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mx-radar { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.mx-ring { fill: none; stroke: #C9D2CE; stroke-width: .8; } .mx-axis { stroke: #DDE3E0; stroke-width: .8; }
.mx-goal { fill: none; stroke: #217346; stroke-width: 1.4; stroke-dasharray: 4 3; }
.mx-poly { fill: rgba(33,115,70,.16); stroke: #217346; stroke-width: 2; stroke-linejoin: round; transition: all 180ms var(--ease-out); }
.mx-minpoly { fill: none; stroke: #C0504D; stroke-width: 1.2; stroke-dasharray: 3 3; }
.mx-ax { font: 600 9.5px var(--mono); fill: var(--ink-2); }
.mx-ax.on { fill: #000; font-size: 11px; }
.mx-pt { fill: #217346; stroke: #fff; stroke-width: 1.5; } .mx-pt.is-low { fill: #C0504D; }
.mx-napt path { stroke: var(--xl-na); stroke-width: 2; stroke-linecap: round; }
.mx-fig figcaption { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; }
.mx-k { display: inline-block; width: 14px; height: 0; border-top: 2px solid #217346; margin-left: 6px; }
.mx-k-min { border-top: 1.5px dashed #C0504D; } .mx-k-goal { border-top: 1.5px dashed #217346; }

/* Tabellenblatt */
.mx-sheet { overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #C6C6C6; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); max-height: calc(100vh - var(--sticky-top) - 76px); min-height: 360px; }
.mx-sheet:focus-visible { outline: 2px solid var(--xl-sel); outline-offset: 1px; }
.mx-grid { position: relative; width: 100%; min-width: 1130px; }
.mx-t { border-collapse: collapse; font: 12.5px/1.3 Arial, 'Liberation Sans', Helvetica, sans-serif; color: #000; min-width: 1130px; width: 100%;
  table-layout: fixed; }
.mx-t .w-rn { width: 42px; } .mx-t .w-b { width: 56px; } .mx-t .w-c { width: auto; } .mx-t .w-d { width: 82px; } .mx-t .w-e { width: 124px; }
.mx-t .w-f { width: 64px; } .mx-t .w-i { width: 76px; } .mx-t .w-p { width: 180px; } .mx-t .w-o { width: 150px; }
.mx-colh th { white-space: normal; line-height: 1.15; }
.mx-t td { overflow-wrap: anywhere; }
.mx-t th, .mx-t td { border: 1px solid var(--xl-grid); padding: 4px 7px; vertical-align: middle; text-align: left; }
.mx-t thead th { position: sticky; z-index: 2; background: var(--xl-head); font-weight: 600; }
.mx-letters th { top: 0; height: 22px; text-align: center; color: #555; font-weight: 400; font-size: 11.5px; padding: 0 6px; line-height: 20px; }
.mx-colh th { top: 21px; font-weight: 700; font-size: 12px; background: #fff; border-bottom: 2px solid #8A8A8A; }
.mx-rn { width: 40px; min-width: 40px; background: var(--xl-head) !important; color: #555; font-weight: 400 !important; font-size: 11px;
  text-align: right !important; font-variant-numeric: tabular-nums; position: sticky; left: 0; z-index: 1; }
thead .mx-rn { z-index: 3; }
.mx-b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-d { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 700; }
.mx-e { text-align: right !important; font-variant-numeric: tabular-nums; }
.mx-f { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 700; }
.mx-i { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 700; }
.mx-o { font-size: 11.5px; }
.mx-scale { display: flex; justify-content: space-between; font-weight: 400; font-size: 10.5px; color: #555; padding: 0 4px; }
.mx-cat td, .mx-cat .mx-b { background: var(--fill); color: var(--ink); font-weight: 700; font-size: 13px; }
.mx-crit td { background: var(--fill); color: var(--ink); font-weight: 700; }
.mx-crit .mx-b a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.mx-crit td.mx-calc, .mx-cat td.mx-d { background: var(--xl-calc); color: #000; }
.mx-crit td.mx-prof { background: #fff; } .mx-cat td.mx-prof, .mx-ind td.mx-prof, .mx-inrow td.mx-prof { background: #fff; }
.mx-ind td { background: var(--xl-gray); font-weight: 700; }
.mx-q td { background: var(--xl-gray); }
.mx-q td.mx-calc { background: var(--xl-calc); }
.mx-inrow td.mx-o { background: var(--xl-note); }
.mx-na { color: var(--xl-na) !important; }
.mx-tag { margin-left: 8px; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: #E8EEF4; color: #24578A; }
.mx-star { text-decoration: none; color: var(--xl-na); font-weight: 700; }
.mx-hint { display: block; color: #555; }
.mx-err { display: block; color: var(--crit); font-weight: 600; }
.mx-err:empty { display: none; }

/* Eingabefelder (Spalte E): grün wie in der Tabelle, Auswahl wie die Datenüberprüfung */
.mx-input { padding: 0 !important; background: var(--xl-in); position: relative; }
.mx-in { width: 100%; height: 30px; border: 0; background: transparent; padding: 0 8px; font: 700 12.5px Arial, 'Liberation Sans', sans-serif;
  text-align: right; color: #000; border-radius: 0; font-variant-numeric: tabular-nums; }
select.mx-in { text-align-last: right; cursor: pointer; padding-right: 4px; }
.mx-in:focus, .mx-in:focus-visible { outline: 2px solid var(--xl-sel); outline-offset: -2px; border-radius: 0; background: #fff; }
.mx-in[aria-invalid="true"] { outline: 2px solid var(--crit); outline-offset: -2px; background: #FDECEA; }
.mx-in:disabled { cursor: default; opacity: 1; }
.mx-unit { position: absolute; right: 8px; bottom: -15px; font-size: 10px; color: #555; white-space: nowrap; pointer-events: none; }
.mx-inrow:has(.mx-unit) td { padding-bottom: 16px; }
/* Felder, die (noch) aus dem Steckbrief kommen: schraffiert statt reinem Grün */
.mx-app .mx-input { background: repeating-linear-gradient(135deg, #fff 0 4px, #E2EFD9 4px 8px); }
.mx-app .mx-d { color: #555; font-weight: 400; }
.mx-src { display: inline-block; white-space: normal; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.85); color: #1C2B27; font-weight: 600; font-size: 11px; }
.mx-src.is-mx { background: #217346; color: #fff; }
.mx-reset { margin-left: 6px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 11px; text-decoration: underline; cursor: pointer; padding: 2px; }
.mx-reset:hover { opacity: .8; }
.mx-crit.mx-live .mx-b::after { content: ""; }

/* Profillinie über der Spalte „Profil“ */
.mx-line { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mx-gridl line { stroke: #E3E3E3; stroke-width: 1; }
.mx-target { stroke: #217346; stroke-width: 1.4; stroke-dasharray: 4 3; }
.mx-pl { fill: none; stroke: #217346; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mx-mint { stroke: #C0504D; stroke-width: 2; }
.mx-line .mx-pt { pointer-events: all; }

@media (max-width: 900px) {
  .mx { padding: 12px 16px 48px; }
  .mx-bar { margin: 0 -8px; padding: 8px; }
  .mx-legend { display: none; }
  .mx-fig { flex-basis: 100%; }
  .mx-sheet { max-height: none; }
  .mx-head { flex-basis: 100%; width: 100%; font-size: 12px; } .mx-head th { width: 48%; }
  .mx-head th, .mx-head td { padding: 7px 8px; }
  .mx-head .mx-min { display: none; }
  .mx-big { font-size: 16px; min-width: 0; }
  .mx-cats { display: table-cell; } .mx-catv { display: inline-block; margin-right: 10px; white-space: nowrap; }
  .mx-title { flex-basis: calc(100% - 140px); }
  .sbar-mx span { display: none; } .sbar-mx { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .mx-poly { transition: none; } .sbar-mx { transition: none; } }
@media print { .mx-bar .mx-close, .sbar-mx { display: none !important; } .mx { padding: 0; } .mx-sheet { overflow: visible; border: 0; } }
.mx-pend { font-size: 10.5px; font-weight: 600; color: #835207; }
.mx-lbl { font-size: 13px; font-weight: 700; margin-left: 10px; }
.main[hidden] { display: none !important; }   /* Rechentabelle eingeblendet */
.mx-q .mx-d { font-size: 11px; overflow-wrap: normal; }

/* Firmenlink: Gewerke mehrfach wählen */
.tradepick { border: 1px solid var(--hair-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.tradepick legend { padding: 0 4px; font-weight: 600; font-size: 13px; }
.tradepick .tp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; }
.tradepick .tp-h { font-size: 12px; font-weight: 600; color: var(--ink-2, #555); margin-top: 4px; }
.tradepick .tp-all { border-bottom: 1px solid var(--hair); padding-bottom: 6px; }

/* Schnelleingabe für Firmen (firmquick.js): Tabelle zum Tippen, Standardwerte, Werte für Markierte */
.quick .q-defs { border: 1px solid var(--hair-2); border-radius: 10px; padding: 8px 12px; background: rgba(255,255,255,.6); }
.quick .q-defs summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.quick .q-defs .form-grid { margin-top: 10px; }
.q-batch { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--mute-bg); color: var(--muted); font-size: 13px; }
.q-batch.on { background: var(--info-bg); color: var(--ink); }
.q-batch .f.inline { display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 160px; }
.q-batch .f.inline .in { min-width: 160px; }
.q-tbl { overflow-x: auto; }
.q-tbl table { min-width: 1080px; border-collapse: collapse; }
.q-tbl th { font-size: 12px; white-space: nowrap; }
.q-tbl td { padding: 2px 4px; border-top: 1px solid var(--hair); vertical-align: middle; }
.q-tbl tr.sel td { background: var(--info-bg); }
.q-tbl tr.err td { background: var(--crit-bg); }
.q-in { width: 100%; min-width: 0; height: 34px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 0 8px; font: inherit; font-size: 13px; color: var(--ink); }
.q-in:hover { border-color: var(--hair-2); background: #fff; }
.q-in:focus { outline: 2px solid var(--brand); outline-offset: -1px; background: #fff; border-color: transparent; }
.q-in.num { text-align: right; font-variant-numeric: tabular-nums; }
select.q-in { padding-right: 2px; }
.q-sel { width: 34px; text-align: center; } .q-n { width: 32px; color: var(--muted); font-size: 12px; text-align: right; padding-right: 8px !important; }
.q-w-l { min-width: 220px; } .q-w-m { min-width: 140px; } .q-w-s { width: 104px; } .q-w-xs { width: 78px; } .q-w-g { min-width: 190px; }
.q-st { width: 112px; font-size: 12px; white-space: nowrap; }
.q-dirty { color: #835207; font-weight: 600; } .q-err { color: var(--crit); font-weight: 600; white-space: normal; }
.q-foot { border-top: 1px solid var(--hair); }
@media (max-width: 700px) { .q-batch .f.inline, .q-batch .f.inline .in { min-width: 0; width: 100%; } .q-batch .btn { width: 100%; } }
/* Schnelleingabe auf der Firmenseite breiter als der Lesebereich (Tabelle mit vielen Spalten) */
@media (min-width: 1100px) {
  .firm-page .quick { width: min(1440px, calc(100vw - 48px)); margin-left: calc(50% - min(720px, calc(50vw - 24px))); }
}
.q-tbl .q-sel, .q-tbl .q-n { position: sticky; z-index: 1; background: var(--glass-strong, #fff); }
.q-tbl .q-sel { left: 0; } .q-tbl .q-n { left: 34px; }
.q-tbl tr.sel .q-sel, .q-tbl tr.sel .q-n { background: var(--info-bg); } .q-tbl tr.err .q-sel, .q-tbl tr.err .q-n { background: var(--crit-bg); }

/* Begehungen (01.12.2026): Checklisten vor Ort, Fotos markieren, Mängel, Vorlagen-Editor, Gastzugang -------------------- */
.ik-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ik-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--ink); text-align: left; border: 0;
           cursor: pointer; transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); font: inherit; }
.ik-card:active { transform: scale(.985); }
.ik-card.on { box-shadow: 0 0 0 2px var(--brand-line), var(--shadow); }
.ik-muster { cursor: default; }
.ik-bar { height: 6px; border-radius: 6px; background: var(--mute-bg); overflow: hidden; }
.ik-bar.big { height: 8px; }
.ik-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 6px; transition: width 300ms var(--ease-out); }
.ik-stats { display: flex; flex-direction: column; gap: 6px; }
.ik-filter { align-items: center; }
.ik-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 16px; align-items: start; }
.ik-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.ik-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ik-sec { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.ik-f { padding: 12px 0; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 80px;
        transition: background-color var(--t-fast) var(--ease-out); }
.ik-sec h2 + .ik-f, .ik-sec .sub + .ik-f { border-top: 0; }
.ik-f.no { box-shadow: inset 3px 0 0 var(--crit); padding-left: 10px; }
.ik-f.req .ik-req { color: var(--crit); }
.ik-flash { background: var(--brand-soft); border-radius: 10px; }
.ik-h { display: flex; gap: 10px; align-items: baseline; }
.ik-no { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; min-width: 2.4em; }
.ik-l { font-weight: 600; flex: 1; overflow-wrap: anywhere; }
.ik-saved { white-space: nowrap; }
.ik-help { margin: 0 0 0 calc(2.4em + 10px); }
.ik-in, .ik-more, .ik-note, .ik-photos { margin-left: calc(2.4em + 10px); }
.ik-in textarea, .ik-in select { width: 100%; max-width: 640px; }
.ik-in textarea.in, .ik-note textarea.in { min-height: 64px; }
.ik-addbtn:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.ik-muster .tag, .ik-card .tag { align-self: flex-start; }
.ik-in .ik-num { max-width: 180px; } .ik-in .ik-date { max-width: 200px; }
.ik-check button { min-width: 64px; }
.ik-check button.on.ja { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.ik-check button.on.nein { background: var(--crit-bg); color: var(--crit); box-shadow: none; }
.ik-check button.on.na { background: #fff; color: var(--ink-2); }
.ik-multi { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ik-more { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ik-more .chip { text-decoration: none; }
.ik-note textarea { width: 100%; max-width: 640px; }
.ik-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ik-thumb { position: relative; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--mute-bg);
            transition: transform var(--t-press) var(--ease-out); }
.ik-thumb:active { transform: scale(.96); }
.ik-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ik-mark { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--crit);
           display: grid; place-items: center; font-size: 11px; }
.ik-add { width: 72px; height: 72px; border-radius: 10px; border: 1.5px dashed var(--brand-line); display: grid; place-items: center; cursor: pointer;
          color: var(--brand); font-size: 24px; background: var(--glass-weak); }
.ik-add:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.ik-issue { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--glass-strong); scroll-margin-top: 80px; }
.ik-issue .ik-photos { margin-left: 0; }
.ik-issue .ref { font-size: 12.5px; font-weight: 600; text-decoration: none; }
.ik-link { border-left: 3px solid var(--brand); }
dialog.ik-dlg { width: min(980px, 96vw); max-height: 94vh; }
.ik-view { display: flex; flex-direction: column; gap: 12px; }
.ik-big { max-width: 100%; max-height: 66vh; object-fit: contain; border-radius: 10px; align-self: center; background: #111; }
.ik-canvas { display: grid; place-items: center; background: #111; border-radius: 10px; overflow: hidden; }
.ik-canvas canvas { max-width: 100%; max-height: 68vh; touch-action: none; cursor: crosshair; display: block; }
.ik-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); vertical-align: middle; }
/* Vorlagen-Editor */
.te-sec { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.te-sh { display: flex; gap: 8px; align-items: center; }
.te-stitle { font-weight: 650; flex: 1; }
.te-sdesc { margin-left: 46px; width: calc(100% - 46px); }
.te-fields { display: flex; flex-direction: column; gap: 6px; min-height: 30px; }
.te-f { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; background: var(--glass-weak); position: relative; }
.te-f.dragging, .te-sec.dragging { opacity: .45; }
.te-f.drop-before::before, .te-f.drop-after::after, .te-sec.drop-before::before, .te-sec.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px;
  background: var(--brand); border-radius: 3px; }
.te-sec { position: relative; }
.te-f.drop-before::before, .te-sec.drop-before::before { top: -4px; } .te-f.drop-after::after, .te-sec.drop-after::after { bottom: -4px; }
.te-grip { cursor: grab; color: var(--faint); padding: 6px 2px; user-select: none; letter-spacing: -2px; line-height: 1; }
.te-no { color: var(--muted); font-size: 12.5px; padding-top: 9px; min-width: 2.2em; font-variant-numeric: tabular-nums; }
.te-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.te-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.te-label { flex: 1 1 280px; min-width: 0; }
.te-help { flex: 1 1 240px; }
.te-opts { flex: 1 1 240px; }
.te-tools { display: flex; gap: 2px; }
.te-add { margin-left: 46px; }
.guest-page .ik-main { margin-top: 6px; }
@media (max-width: 1100px) { .ik-layout { grid-template-columns: minmax(0, 1fr); } .ik-side { position: static; max-height: none; } }
@media (max-width: 760px) {
  .ik-help, .ik-in, .ik-more, .ik-note, .ik-photos { margin-left: 0; }
  .ik-check { display: flex; width: 100%; } .ik-check button { flex: 1; }
  .ik-sec { padding: 14px 12px; }
  .te-f { flex-wrap: wrap; } .te-tools { width: 100%; justify-content: flex-end; } .te-sdesc, .te-add { margin-left: 0; width: 100%; }
  .ik-thumb, .ik-add { width: 64px; height: 64px; }
}

/* Seitenleiste in Bereichen (01.12.2026): einklappbare Überschriften, Steckbrief-Werkzeuge unter einem Eintrag ------------ */
.nav-sec { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.nav-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent;
  color: var(--side-muted); font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 8px 12px 4px; cursor: pointer; border-radius: 8px; text-align: left; white-space: nowrap; }
.nav-sec-b[hidden], .nav-tree-b[hidden] { display: none !important; }
.nav-sec-h:hover { color: #fff; }
.nav-sec-h[aria-disabled="true"] { cursor: default; }
.nav-sec.here .nav-sec-h { color: #fff; }
.nav-chev { display: inline-grid; place-items: center; transition: transform var(--t-fast) var(--ease-out); opacity: .8; }
.nav-sec:not(.open) > .nav-sec-h .nav-chev, .nav-tree:not(.open) .nav-twisty { transform: rotate(-90deg); }
.nav-sec.here > .nav-sec-h .nav-chev { opacity: .35; }
.nav-sec-b { display: flex; flex-direction: column; gap: 1px; }
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > a { flex: 1 1 auto; min-width: 0; padding-right: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sec-solo .nav-row > a { font-weight: 600; }
.nav-twisty { flex: 0 0 auto; width: 30px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent;
  color: var(--side-muted); cursor: pointer; transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) ease; }
.nav-twisty:hover { background: var(--side-hover); color: #fff; }
.nav-twisty[aria-disabled="true"] { cursor: default; opacity: .4; }
.nav-tree-b { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 4px 10px; padding-left: 4px; border-left: 1px solid rgba(255,255,255,.14); }
.nav-tree-b .nav-grp { padding-top: 6px; }
.nav-sec + .nav-sec { border-top: 1px solid rgba(255,255,255,.07); padding-top: 4px; }
@media (max-width: 900px) { .nav-sec-h { min-height: 40px; padding-top: 10px; } .nav-twisty { width: 44px; height: 44px; } }
/* Begehungen II (01.12.2026): Umbenennen per Klick, Positivbeispiel als Seitenleiste ------------------------------------- */
.ik-linkcard { position: relative; }
.ik-linkcard .ik-open { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.ik-linkcard .ik-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ik-linkcard > :not(.ik-open) { position: relative; z-index: 1; pointer-events: none; }
.ik-linkcard .ik-name, .ik-linkcard .ik-name * { pointer-events: auto; }
.ik-name { display: inline; border: 0; background: transparent; padding: 0 2px; margin: 0 -2px; font: inherit; font-weight: 650; color: inherit;
  text-align: left; cursor: text; border-radius: 6px; text-decoration: underline dashed transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) ease, background-color var(--t-fast) ease; }
.ik-name:hover, .ik-name:focus-visible { text-decoration-color: var(--brand-line); background: var(--brand-soft); }
.ik-name::after { content: " ✎"; font-size: .75em; color: var(--faint); opacity: 0; transition: opacity var(--t-fast) ease; }
.ik-name:hover::after, .ik-name:focus-visible::after { opacity: 1; }
h1 .ik-name { font-weight: inherit; }
.ik-rename { width: 100%; max-width: 640px; font-weight: 600; }
h1 .ik-rename { font-size: 22px; }
.ik-exmain { box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.ik-exbtn { color: var(--ok); }
dialog.ik-drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(720px, 100vw); max-width: 100vw; border-radius: 18px 0 0 18px;
  padding: 0; animation: drawer-in 220ms var(--ease-drawer); }
.ik-drawer-in { display: flex; flex-direction: column; height: 100%; }
.ik-drawer-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 18px 20px 12px; border-bottom: 1px solid var(--hair); }
.ik-drawer-b { flex: 1; overflow-y: auto; padding: 14px 16px 24px; background: rgba(238,243,241,.6); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.ik-drawer { animation: none; } }
@media (max-width: 760px) { dialog.ik-drawer { width: 100vw; border-radius: 0; } }

/* Aufgaben-Boards (Board → Listen → Karten) ------------------------------------------------- */
.bk-bar { margin: -4px 0 0; }
.bk-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-filter #bk-q, .bk-filter #my-q { flex: 1 1 240px; min-width: 0; }
.bk-filter .in.small { width: auto; max-width: 220px; }
.bk-ftoggle { display: none; }
.bk-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; min-width: 0; scroll-snap-type: x proximity; }
.bk-col { flex: 0 0 272px; background: var(--glass-weak); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: inset 0 0 0 1px var(--glass-edge); scroll-snap-align: start; transition: background-color var(--t-fast) ease; max-height: calc(100vh - 220px); }
.bk-col.over { background: rgba(31,107,87,.10); }
.bk-col-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 2px 4px; }
.bk-col-h h2 { font-size: 14px; overflow-wrap: anywhere; }
.bk-col-h .row { flex: 0 0 auto; gap: 4px; }
.bk-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; overflow-y: auto; padding: 2px; margin: -2px; }
.bk-card { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--glass-strong); min-width: 0; overflow-wrap: anywhere; cursor: pointer;
  transition: box-shadow var(--t-fast) ease, transform var(--t-press) var(--ease-out); }
.bk-card[draggable=true] { cursor: grab; }
@media (hover: hover) and (pointer: fine) { .bk-card:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--brand-line); } }
.bk-card:active { transform: scale(.985); }
.bk-card.dragging { opacity: .4; }
.bk-card.done .bk-t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(28,43,39,.3); }
.bk-ph { border: 2px dashed var(--brand-line); border-radius: var(--r); background: var(--brand-soft); min-height: 36px; }
.bk-t { font-weight: 600; line-height: 1.35; }
.bk-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; }
.bk-meta .chip { font-size: 11.5px; }
.bk-due { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bk-due.late, .bk-late { color: var(--crit); font-weight: 600; }
.bk-prog { display: flex; align-items: center; gap: 8px; }
.bk-prog .ik-bar { flex: 1; }
.bk-people { display: flex; gap: 0; align-items: center; }
.bk-people .bk-av + .bk-av { margin-left: -5px; }
.bk-av { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 0 0 2px #fff; background: var(--brand); width: 24px; height: 24px; }
.bk-av.ext { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--warn); }
.bk-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.bk-label { --lc: var(--brand); display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 0 7px; border-radius: 999px;
  color: var(--ink-2); background: color-mix(in srgb, var(--lc) 13%, transparent); }
.bk-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lc); }
.bk-quick .in, .bk-quick .in.small { width: 100%; background: transparent; border-style: dashed; }
.bk-quick .in:focus { background: #fff; border-style: solid; }
.bk-addlist { flex: 0 0 200px; border: 1.5px dashed var(--brand-line); background: transparent; color: var(--brand-dark); border-radius: 16px; padding: 14px; font-weight: 600; cursor: pointer; }
.bk-addlist:hover { background: var(--brand-soft); }
.bk-sort { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.bk-table td { vertical-align: top; }
/* Zeitachse */
.bk-tl { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr); border-radius: var(--r); background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.bk-tl-names { display: flex; flex-direction: column; border-right: 1px solid var(--hair); min-width: 0; }
.bk-tl-hd { height: 36px; display: flex; flex: 0 0 auto; border-bottom: 1px solid var(--hair); }
.bk-tl-name { height: 32px; flex: 0 0 auto; border: 0; background: transparent; text-align: left; padding: 0 10px; font-size: 12.5px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--hair-2); }
.bk-tl-name:hover { background: var(--brand-soft); }
.bk-tl-scroll { overflow-x: auto; min-width: 0; }
.bk-tl-grid { position: relative; }
.bk-tl-grid .bk-tl-hd span { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: 10.5px; color: var(--muted);
  padding-bottom: 4px; border-left: 1px solid var(--hair-2); font-variant-numeric: tabular-nums; }
.bk-tl-grid .bk-tl-hd span b { font-size: 10px; color: var(--ink-2); }
.bk-tl-grid .bk-tl-hd span.we { background: rgba(28,43,39,.035); }
.bk-tl-grid .bk-tl-hd span.now { color: var(--crit); font-weight: 700; }
.bk-tl-row { height: 32px; position: relative; border-bottom: 1px solid var(--hair-2); }
.bk-tl-bar { position: absolute; top: 6px; height: 20px; border: 0; border-radius: 6px; background: var(--info); color: #fff; font-size: 11px; font-weight: 600; padding: 0 6px;
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 2; }
.bk-tl-bar.pt { border-radius: 50%; width: 20px !important; padding: 0; }
.bk-tl-bar.st-erledigt { background: var(--ok); } .bk-tl-bar.st-wartet { background: var(--crit); } .bk-tl-bar.st-geklaert { background: var(--warn); }
.bk-tl-bar.st-offen { background: #5E7A71; }
.bk-tl-bar.late { box-shadow: 0 0 0 2px var(--crit); }
.bk-tl-deps { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bk-tl-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--crit); opacity: .55; pointer-events: none; z-index: 1; }
/* Kalender */
.bk-calh { min-width: 170px; text-align: center; font-size: 16px; }
.bk-cal { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--hair); }
.bk-cal-h, .bk-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bk-cal-h span { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.55); }
.bk-day { min-height: 96px; padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 .5px var(--hair); min-width: 0; }
.bk-cal.week .bk-day { min-height: 260px; }
.bk-day.out { background: rgba(255,255,255,.18); } .bk-day.out .bk-dn { color: var(--faint); }
.bk-day.now .bk-dn { background: var(--brand); color: #fff; }
.bk-dn { align-self: flex-start; font-size: 12px; font-weight: 600; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 11px; font-variant-numeric: tabular-nums; }
.bk-ev { border: 0; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  background: var(--info-bg); color: var(--info); font-weight: 600; }
.bk-ev.st-erledigt { background: var(--ok-bg); color: var(--ok); text-decoration: line-through; } .bk-ev.st-geklaert { background: var(--warn-bg); color: var(--warn); }
.bk-ev.st-wartet, .bk-ev.late { background: var(--crit-bg); color: var(--crit); }
/* Karten-Detail */
dialog.bk-drawer { width: min(760px, 100vw); }
.bk-head .ik-name, .bk-head h2 { overflow-wrap: anywhere; }
.bk-props { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 14px 16px; }
.bk-prop { display: contents; }
.bk-pl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.bk-pv { min-width: 0; }
.bk-props .in.small { width: auto; max-width: 100%; }
.bk-body { display: flex; flex-direction: column; gap: 18px; }
.bk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 4px 1px 3px; border-radius: 999px; background: rgba(255,255,255,.75); box-shadow: inset 0 0 0 1px var(--hair); font-size: 12.5px; }
.bk-chip .icon-btn { width: 20px; height: 20px; min-height: 0; font-size: 11px; }
.bk-props .in.small.bk-add { width: auto; max-width: 220px; }
.bk-desc { padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.6); cursor: text; min-height: 40px; }
.bk-desc p { margin: 0 0 6px; } .bk-desc ul { margin: 0 0 6px; padding-left: 20px; }
.bk-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.bk-cl { padding: 10px 12px; border-radius: var(--r); background: rgba(255,255,255,.6); display: flex; flex-direction: column; gap: 6px; }
.bk-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-items li { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.bk-items .check { flex: 1; min-width: 0; }
.bk-done { color: var(--muted); text-decoration: line-through; }
.bk-additem .in { flex: 1; }
.bk-rel, .bk-files { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bk-rel li, .bk-files li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-drop { display: block; border: 1.5px dashed var(--brand-line); border-radius: var(--r); padding: 14px; text-align: center; color: var(--muted); cursor: pointer; transition: background-color var(--t-fast) ease; }
.bk-drop.over, .bk-drop:hover { background: var(--brand-soft); color: var(--brand-dark); }
.bk-comments, .bk-activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bk-comments li { display: flex; gap: 10px; align-items: flex-start; }
.bk-comments li > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bk-comments p { margin: 2px 0 0; white-space: pre-wrap; }
.bk-activity li { font-size: 13px; overflow-wrap: anywhere; }
.bk-mention-wrap { position: relative; }
.bk-mention { position: absolute; left: 0; top: 100%; z-index: 5; list-style: none; margin: 4px 0 0; padding: 4px; min-width: 220px; max-height: 220px; overflow-y: auto;
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow), inset 0 0 0 1px var(--hair); }
.bk-mention li { padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.bk-mention li.on, .bk-mention li:hover { background: var(--brand-soft); }
.bk-gcom .in { flex: 1; min-width: 0; }
.my-group .tbl td { vertical-align: top; }
@media (max-width: 760px) {
  .bk-filter select.in.small { width: 0; min-width: 0; max-width: none; flex: 1 1 calc(50% - 4px); }
  .bk-ftoggle { display: inline-flex; }
  .bk-filter:not(.open) > select, .bk-filter:not(.open) > .check { display: none; }
  .bk-board { scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 10px; scroll-padding: 0 16px; }
  .bk-col { flex-basis: 84vw; max-height: none; }
  .bk-cards { overflow: visible; }
  .bk-props { grid-template-columns: 88px minmax(0, 1fr); gap: 8px 10px; padding: 12px; }
  .bk-props .in.small { width: 100%; }
  .bk-bar > a { display: none; }
  .bk-tl { grid-template-columns: 120px minmax(0, 1fr); }
  .bk-day { min-height: 64px; padding: 3px; }
  .bk-ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .bk-cal.week .bk-ev { font-size: 11px; height: auto; padding: 2px 4px; }
  .bk-calh { min-width: 0; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .bk-card:active { transform: none; } }
/* Karten-Detail: Titel direkt bearbeiten, Speicherstatus */
.bk-titlewrap { margin: 0; }
.bk-title-in { display: block; width: 100%; resize: none; overflow: hidden; border: 1px solid transparent; border-radius: 8px; background: transparent;
  font: inherit; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); padding: 2px 6px; margin-left: -7px; transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease; }
.bk-title-in:hover { border-color: var(--hair); }
.bk-title-in:focus { outline: none; border-color: var(--brand-line); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.bk-headr { align-items: flex-end; flex: 0 0 auto; }
.bk-save { font-size: 12px; color: var(--muted); min-height: 18px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bk-save[data-state=saved] { color: var(--ok); }
.bk-save[data-state=error] { color: var(--crit); font-weight: 600; }
.bk-save .btn { min-height: 0; padding: 1px 8px; }
@media (max-width: 760px) { .bk-title-in { font-size: 17px; } }
.bk-head { flex: 1; min-width: 0; }

/* Gebäudehandbuch PLUS / PREMIUM (Originalvorlage, Tabellenansicht wie Excel) ------------------------------------------------ */
.ghb-toggles { gap: 6px; }
.ghb-host:empty { display: none; }
.ghb { --xl-grid: #D4D4D4; --xl-head: #F3F3F3; --xl-in: #FFFFFF; --xl-d: #F4F7F5; --xl-f: #FDE9D9; --xl-grp: #E2EFD9;
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; min-width: 0; }
.ghb[hidden] { display: none; }
.ghb-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.ghb-title { min-width: 0; flex: 1 1 280px; }
.ghb-title .sub { overflow-wrap: anywhere; }
.ghb-actions { gap: 6px; align-items: center; }
.ghb-close { display: inline-flex; align-items: center; gap: 6px; }
.ghb-save { font-size: 12px; color: var(--muted); min-width: 11ch; }
.ghb-save[data-state=saved] { color: var(--ok); } .ghb-save[data-state=error] { color: var(--crit); font-weight: 600; }
.ghb-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 18px; margin: 0; padding: 10px 12px;
  border-radius: 10px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px var(--hair); }
.ghb-head div { min-width: 0; } .ghb-head dt { font-size: 11.5px; color: var(--muted); font-weight: 600; } .ghb-head dd { margin: 0; overflow-wrap: anywhere; }
.ghb-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--ink-2); }
.ghb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ghb-sw { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.2); }
.ghb-sw-in { background: #fff; box-shadow: inset 0 -2px 0 var(--brand); } .ghb-sw-d { background: var(--xl-d); } .ghb-sw-f { background: var(--xl-f); }
.ghb-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.ghb-tabs button { flex: 0 0 auto; border: 1px solid var(--xl-grid); border-bottom-width: 2px; background: var(--xl-head); border-radius: 6px 6px 0 0;
  padding: 5px 10px; font: 12.5px/1.3 Arial, 'Liberation Sans', Helvetica, sans-serif; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ghb-tabs button.on { background: #fff; border-bottom-color: #217346; font-weight: 700; color: #217346; }
.ghb-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ghb-sheet { overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #C6C6C6; border-radius: 4px; max-height: 70vh; }
.ghb-sheet:focus-visible { outline: 2px solid #217346; outline-offset: 1px; }
.ghb-t { border-collapse: collapse; font: 12px/1.3 Arial, 'Liberation Sans', Helvetica, sans-serif; color: #000; }
.ghb-t th, .ghb-t td { border: 1px solid var(--xl-grid); padding: 3px 6px; vertical-align: top; text-align: left; min-width: 96px; max-width: 260px; }
.ghb-t td { overflow-wrap: anywhere; white-space: pre-wrap; }
.ghb-t thead th { position: sticky; z-index: 2; background: var(--xl-head); }
.ghb-letters th { top: 0; height: 20px; text-align: center; color: #555; font-weight: 400; font-size: 11px; padding: 0 4px; }
.ghb-colh th { top: 20px; background: #fff; font-weight: 700; font-size: 11.5px; white-space: pre-line; border-bottom: 2px solid #8A8A8A; }
.ghb-colh th.ghb-f { background: var(--xl-f); }
.ghb-rn { min-width: 38px !important; width: 38px; background: var(--xl-head) !important; color: #555; font-weight: 400 !important; font-size: 11px;
  text-align: right !important; font-variant-numeric: tabular-nums; position: sticky; left: 0; z-index: 1; }
thead .ghb-rn { z-index: 3; }
.ghb-grp td { background: var(--xl-grp); font-weight: 700; }
.ghb-d { background: var(--xl-d); color: #333; }
.ghb-f { background: var(--xl-f); color: #333; font-size: 11.5px; }
.ghb-xmark { text-align: center !important; font-weight: 700; }
.ghb-in { padding: 0 !important; background: #fff; }
.ghb-x { display: block; width: 100%; min-width: 96px; border: 0; background: transparent; font: inherit; padding: 4px 6px; resize: none; color: #000; }
select.ghb-x { padding: 3px 2px; }
.ghb-x:focus { outline: 2px solid #217346; outline-offset: -2px; background: #F4FBF6; }
.ghb-in.num .ghb-x { text-align: right; font-variant-numeric: tabular-nums; }
.ghb-free td { color: var(--muted); font-style: italic; background: repeating-linear-gradient(135deg, #fff 0 6px, #FAFAFA 6px 12px); }
.ghb-na td { color: var(--muted); }
.ghb-over th, .ghb-over td { background: #FFF4E5 !important; }
.ghb-empty { padding: 10px 2px; }
.ghb-unassigned ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ghb-unassigned li { justify-content: space-between; gap: 8px; }
.ghb-unassigned select { max-width: 100%; }
@media (max-width: 760px) {
  .ghb { padding: 12px; }
  .ghb-sheet { max-height: 60vh; }
  .ghb-t th, .ghb-t td { min-width: 84px; }
}
.ghb-unassigned select { min-width: min(100%, 320px); }
