/* ==========================================================================
   bq nexus · LV — eine CSS-Datei, kein Build.
   Hell = :root (Standard seit M3) · Dunkel = :root[data-theme="dark"]
   Umschalten: <html data-theme="dark">  (ein Attribut, wenige Zeilen JS)
   ========================================================================== */

/* ---------- 0 · Schriften (selbst gehostet, alle SIL OFL 1.1) ------------
   Outfit (Überschriften, Slogan) · Inter (Text, Tabellen) · JetBrains Mono (OZ, Codes) */
/*@FONTFACE-START*/
/* Liegen unter static/schriften/, Lizenzen daneben (LIZENZ-*.txt).
   Outfit variabel (100-900) aus google/fonts; Inter und JetBrains Mono als
   feste Schnitte in den Subsets latin + latin-ext - dank unicode-range laedt
   der Browser nur, was er braucht. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/schriften/outfit-variable.woff2) format('woff2');
}

/* Inter 400 · latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/schriften/inter-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter 400 · latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/schriften/inter-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter 500 · latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/schriften/inter-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter 500 · latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/schriften/inter-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter 600 · latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/schriften/inter-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter 600 · latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/schriften/inter-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono 400 · latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/schriften/jetbrains-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 400 · latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/schriften/jetbrains-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono 500 · latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/schriften/jetbrains-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono 500 · latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/schriften/jetbrains-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/*@FONTFACE-END*/

/* ---------- 1 · Tokens ---------------------------------------------------- */
:root[data-theme="dark"], [data-theme="dark"] {
  color-scheme: dark;
  /* Fläche */
  --bg:            #1C1F25;
  --surface:       #23272E;
  --surface-2:     #2A2F37;
  --surface-3:     #333943;
  --line:          #3A404B;
  --line-strong:   #4E5663;
  --row-hover:     #282C34;
  --row-open:      #2C323C;
  /* Text (Kontrast auf --bg / --surface) */
  --text:          #F1F3F6;   /* 17,0 : 1 / 16,0 : 1 */
  --text-2:        #C3C8D1;   /*  9,5 : 1 /  8,9 : 1 */
  --text-3:        #A2A9B4;   /*  6,4 : 1 /  6,0 : 1 */
  --link:          #F1F3F6;   /*  8,3 : 1  – Links, Fokus, aktive Auswahl */
  --focus:         #F1F3F6;
  /* Marke – nur Logo, Bildmarke, ein Hauptknopf. Nie Text, nie Status. */
  --brand-blue:    #2340F0;   /* auf --bg 2,9 : 1 → nur Grafik */
  --brand-teal:    #30D5CF;
  --brand-grad:    linear-gradient(45deg, #2340F0 0%, #2A7BE8 50%, #30D5CF 100%);
  /* Bedeutung – getrennt von der Marke, immer mit Symbol + Wort */
  --warn:          #FFB266;   /* Lücke / Warnung · 8,8 : 1 auf --warn-bg */
  --warn-bg:       #3A2A16;
  --warn-line:     #8A5A20;
  --ok:            #9CD97C;   /* geprüft · gelbgrün, klar weg vom Türkis · 9,3 : 1 */
  --ok-bg:         #20301D;
  --ok-line:       #3E6A2F;
  --suggest:       #D0D4DB;   /* Vorschlag des Modells · neutral, gestrichelt */
  --suggest-line:  #6A7280;
  --vorschlag:     #C7B5FF;   /* Vorschlag zum Übernehmen (Büro, KI, Freitext) · 8,1 : 1 auf --vorschlag-bg */
  --vorschlag-bg:  #2A2340;
  --vorschlag-line:#6A55B0;
  --danger:        #FF928A;   /* Fehler (Datei unlesbar) · 7,2 : 1 */
  --danger-bg:     #3B2220;
  --danger-line:   #7E3530;
  /* Zeichnung */
  --draw-ink:      #D2D6DD;
  --draw-fill:     #262B33;
  --draw-hatch:    #6C7482;
  --shadow:        none;
}

:root, [data-theme="light"] {
  color-scheme: light;
  --bg:            #F5F6F8;
  --surface:       #FFFFFF;
  --surface-2:     #F1F3F6;
  --surface-3:     #E7EAEF;
  --line:          #DDE1E7;
  --line-strong:   #BEC5CF;
  --row-hover:     #F7F8FA;
  --row-open:      #F1F4FB;
  --text:          #0C0F14;   /* 17,8 : 1 / 19,2 : 1 */
  --text-2:        #454D5B;   /*  7,9 : 1 /  8,5 : 1 */
  --text-3:        #5E6776;   /*  5,3 : 1 /  5,7 : 1 */
  --link:          #0C0F14;   /*  6,3 : 1 */
  --focus:         #0C0F14;
  --brand-blue:    #2340F0;
  --brand-teal:    #30D5CF;   /* auf Weiß 1,8 : 1 → nur Grafik */
  --brand-grad:    linear-gradient(45deg, #2340F0 0%, #2A7BE8 50%, #30D5CF 100%);
  --warn:          #9A4A00;   /* 5,7 : 1 auf --warn-bg */
  --warn-bg:       #FFF2E2;
  --warn-line:     #F0B877;
  --ok:            #1D6B2C;   /* 5,8 : 1 auf --ok-bg */
  --ok-bg:         #E8F5E4;
  --ok-line:       #A6D398;
  --suggest:       #4A5261;
  --suggest-line:  #9AA3B0;
  --vorschlag:     #5B34C7;   /* 6,6 : 1 auf --vorschlag-bg */
  --vorschlag-bg:  #F3EFFF;
  --vorschlag-line:#B9A5F2;
  --danger:        #B42318;
  --danger-bg:     #FDECEA;
  --danger-line:   #F1A9A1;
  --draw-ink:      #2A303B;
  --draw-fill:     #FFFFFF;
  --draw-hatch:    #8A93A2;
  --shadow:        none;
}

:root {
  /* Schrift */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-ui:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --fs-2xs: 13px;    /* Gesperrte Etiketten – nichts unter 13 px (Entwurf 4) */
  --fs-xs:  13px;
  --fs-sm:  14px;
  --fs-tbl: 15px;    /* Tabellen */
  --fs-md:  16px;    /* Fließtext */
  --fs-lg:  18px;
  --fs-xl:  22px;
  --fs-2xl: 30px;    /* Seitentitel (Outfit) */
  --fs-3xl: 34px;    /* Kennzahlen (Inter, tabellarisch) */
  --lh-tight: 1.2;
  --lh: 1.55;
  --track-caps: .08em;  /* Slogan & Etiketten */
  /* Raster */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --r-sm: 0; --r: 0; --r-lg: 0;
  --row-h: 42px;
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 64px;
}

/* ---------- 2 · Grundlagen ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/var(--lh) var(--font-ui);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; margin: 0; line-height: var(--lh-tight); }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.num { font-variant-numeric: tabular-nums lining-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: 0; }
.caps { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-3); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.slogan { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-xs); letter-spacing: .32em; text-transform: uppercase; color: var(--text-2); }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }

/* ---------- 3 · Rahmen: Seitenleiste + Hauptbereich ---------------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.sb { display: flex; flex-direction: column; gap: var(--sp-5); padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); }
.sb-brand { display: flex; flex-direction: column; gap: 6px; padding: 2px 8px 0; color: var(--text); text-decoration: none; }
.sb-brand:hover { text-decoration: none; }
.sb-brand svg { display: block; }
.sb-brand .sb-product { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .28em; color: var(--text-2); padding-left: 2px; }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group > .caps { padding: 0 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); font-size: var(--fs-md); text-decoration: none; }
.sb-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sb-link.is-active { background: var(--surface-3); color: var(--text); font-weight: 500; }
.sb-link .count { margin-left: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text-3); }
.sb-link .count.is-warn { color: var(--warn); font-weight: 600; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.sb-note { display: flex; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: var(--fs-xs); line-height: 1.4; color: var(--text-2); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-size: var(--fs-sm); color: var(--text-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-size: 11px; font-weight: 600; }
/* eingeklappt (Tablet hochkant) */
.sb.is-collapsed { width: var(--sidebar-w-collapsed); padding: 16px 10px; align-items: center; }
.sb.is-collapsed .sb-link { width: 44px; height: 44px; padding: 0; justify-content: center; }

/* Segment-Umschalter (Dunkel/Hell) */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; border: 0; border-radius: 4px; background: transparent; color: var(--text-2); font: 500 var(--fs-sm) var(--font-ui); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: var(--sp-5); min-height: 60px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--bg); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.crumbs strong { color: var(--text); font-weight: 500; }
.page { display: flex; flex-direction: column; gap: var(--sp-5); padding: 24px 28px 28px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.page-head .sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 16px; }

/* ---------- 4 · Schrittleiste ------------------------------------------- */
.steps { display: flex; align-items: center; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.step { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 6px; border-radius: 18px; font-size: var(--fs-sm); color: var(--text-2); text-decoration: none; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; border: 1.5px solid var(--line-strong); color: var(--text-2); }
.step-sep { width: 20px; height: 1.5px; background: var(--line-strong); }
.step.is-done .dot { border-color: var(--text-2); background: var(--text-2); color: var(--bg); }
.step.is-done { color: var(--text-2); }
.step.is-active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.step.is-active .dot { border-color: var(--text); background: var(--text); color: var(--bg); }
.step.is-open:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.step.is-locked { color: var(--text-3); cursor: not-allowed; }
.step.is-locked .dot { border-style: dashed; color: var(--text-3); }
.step .why { font-size: var(--fs-xs); color: var(--text-3); font-weight: 400; }

/* ---------- 5 · Knöpfe --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 var(--fs-md)/1 var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: var(--text-2); border-color: var(--text-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: var(--fs-sm); }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: var(--fs-md); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 1; background: var(--surface-2); color: var(--text-3); border-color: var(--line); border-style: dashed; cursor: not-allowed; }
/* Der eine Hauptknopf mit Markenverlauf: Verlauf als Rahmen, Text bleibt kontraststark */
.btn-brand { position: relative; border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box; color: var(--text); font-weight: 600; }
.btn-brand:hover { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--brand-grad) border-box; }
.btn-brand .xmark { width: 16px; height: 16px; }

/* ---------- 6 · Status-Markierungen (immer Symbol + Wort) ---------------- */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-2); background: transparent; }
.tag .i { width: 13px; height: 13px; stroke-width: 2.2; }
.tag-warn    { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.tag-ok      { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.tag-suggest { color: var(--suggest); border-style: dashed; border-color: var(--suggest-line); }
.tag-vorschlag { color: var(--vorschlag); background: var(--vorschlag-bg); border-color: var(--vorschlag-line); }
.tag-danger  { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.tag-neutral { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }

/* Lücke im Tabellenfeld: nie leer, nie grau */
.gap { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; }
.gap .i { width: 14px; height: 14px; stroke-width: 2.2; }
td.is-gap { background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* Hinweisblock */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--text); font-size: var(--fs-md); }
.alert > .i { color: var(--warn); margin-top: 2px; width: 18px; height: 18px; }
.alert strong { color: var(--warn); }
.alert .alert-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.alert .alert-body .muted { font-size: var(--fs-sm); }
.alert-ok { border-color: var(--ok-line); background: var(--ok-bg); }
.alert-ok > .i, .alert-ok strong { color: var(--ok); }
.alert-danger { border-color: var(--danger-line); background: var(--danger-bg); }
.alert-danger > .i, .alert-danger strong { color: var(--danger); }

/* ---------- 7 · Tabelle -------------------------------------------------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-tbl); }
.tbl th { position: sticky; top: 0; z-index: 1; height: 34px; padding: 0 10px; background: var(--surface-2); border-bottom: 1px solid var(--line-strong); text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl td { height: var(--row-h); padding: 0 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl td.unit, .tbl th.unit { padding-left: 4px; width: 36px; color: var(--text-3); text-align: left; }
.tbl td.num + td.unit { color: var(--text-3); }
.tbl .sec td { height: 30px; background: var(--bg); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-3); }
.tbl .sec.is-warn td { color: var(--warn); }
.tbl tr.is-open td { background: var(--row-open); border-bottom-color: transparent; }
.tbl tr.proof td { background: var(--row-open); padding: 4px 10px 18px; height: auto; }
.tbl .proof-tbl td { height: auto; padding: 3px 0; border: 0; background: transparent; }
.tbl .proof-tbl tr:hover td { background: transparent; }
.tbl .proof-tbl td.num { padding-right: 0; }
.tbl .clip { max-width: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .code { font-family: var(--font-mono); font-size: 12px; }
.tbl .src { font-size: var(--fs-sm); color: var(--text-2); }
.tbl .toggle { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--text-2); cursor: pointer; }
.tbl .toggle:hover { background: var(--surface-3); color: var(--text); }
.filters { display: flex; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font: 500 var(--fs-sm) var(--font-ui); cursor: pointer; }
.chip .n { font-variant-numeric: tabular-nums; color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.chip.is-warn .n { color: var(--warn); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text-3); font-size: var(--fs-sm); min-width: 220px; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; outline: none; width: 100%; }

/* ---------- 8 · Konfidenz ------------------------------------------------ */
.conf { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--text-2); }
.conf .bar { display: grid; grid-template-columns: repeat(5, 6px); gap: 2px; }
.conf .bar i { display: block; height: 10px; border-radius: 1px; background: var(--line-strong); }
.conf .bar i.on { background: var(--text-2); }
.conf.is-low { color: var(--warn); font-weight: 600; }
.conf.is-low .bar i.on { background: var(--warn); }

/* ---------- 9 · Kennzahlen ----------------------------------------------- */
.kpis { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.kpi .v { font-size: 28px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.kpi .src { font-size: var(--fs-xs); color: var(--text-3); }
.kpi.is-warn .v { color: var(--warn); }

/* ---------- 10 · Querschnitt-Zeichnung ------------------------------------ */
.xsec svg { display: block; }
.xsec .ln { fill: none; stroke: var(--draw-ink); stroke-width: 1; }
.xsec .layer { fill: var(--draw-fill); stroke: var(--draw-ink); stroke-width: 1; }
.xsec .lead { fill: none; stroke: var(--text-3); stroke-width: .75; }
.xsec .lbl { fill: var(--text); font: 500 12px var(--font-ui); }
.xsec .lbl-mm { fill: var(--text-2); font: 500 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.xsec .dim { fill: none; stroke: var(--text-2); stroke-width: 1; }
.xsec .dim-t { fill: var(--text); font: 600 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.xsec .hatch { stroke: var(--draw-hatch); stroke-width: .8; fill: none; }
.xsec .dots { fill: var(--draw-hatch); }
.xsec .warnline { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; }
.xsec .warn-t { fill: var(--warn); font: 600 12px var(--font-ui); }

/* ---------- 11 · Grundriss-Skizze ------------------------------------------ */
.plan .room { fill: var(--surface-2); stroke: var(--draw-hatch); stroke-width: 1; }
.plan .room.is-sel { fill: var(--row-open); stroke: var(--text); stroke-width: 2; }
.plan .room.is-gap { fill: var(--warn-bg); stroke: var(--warn); stroke-width: 1.25; stroke-dasharray: 4 3; }
.plan .wall { fill: none; stroke: var(--draw-ink); stroke-width: 3; }
.plan .rlbl { fill: var(--text-2); font: 500 9.5px var(--font-mono); }
.plan .rlbl-sel { fill: var(--text); font: 700 10px var(--font-mono); }

/* ---------- 12 · Upload-Feld ---------------------------------------------- */
.drop { position: relative; display: flex; align-items: center; gap: 20px; padding: 22px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.drop.is-over { border-color: var(--link); background: var(--row-open); }
.drop .drop-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); flex: none; }
.drop .drop-text { display: flex; flex-direction: column; gap: 4px; }
.drop .drop-text strong { font-size: var(--fs-lg); font-weight: 600; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--text-2); }

/* ---------- 13 · Hintergrundmotiv (nur Startseite) ------------------------- */
.bg-x { position: absolute; pointer-events: none; opacity: .14; }
[data-theme="light"] .bg-x { opacity: .10; }

/* ---------- 14 · Tablet ---------------------------------------------------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
  .sb .label, .sb .count, .sb .caps, .sb-note span, .sb-product { display: none; }
  .btn, .chip, .sb-link, .step { min-height: 44px; }
  .tbl td { height: 44px; }
}

/* ---------- 15 · Ergaenzungen beim Einbau (BIW) ----------------------------
   Alles oberhalb stammt unveraendert aus dem Entwurf (Claude-Design,
   bq-nexus.css), bis auf die @font-face-Regeln. Was beim Einbau dazukam,
   steht hier, damit der Entwurf vergleichbar bleibt.                       */

/* Eingeklappte Leiste (Tablet): statt des Schriftzugs die X-Bildmarke. Der
   Entwurf blendet nur die Beschriftungen aus; der 132 px breite Schriftzug
   passte nicht in 64 px. */
.sb-brand .sb-mark { display: none; }
@media (max-width: 1100px) {
  .sb { padding: 16px 10px; align-items: center; }
  .sb-brand .sb-logo { display: none; }
  .sb-brand .sb-mark { display: block; }
  .sb-link { width: 44px; justify-content: center; padding: 0; }
  .seg { grid-template-columns: 1fr; }
}
.sb-link .count.is-note { color: var(--warn); font-weight: 600; font-size: var(--fs-2xs);
                          letter-spacing: .04em; }
/* Kopfzeile: echte Dateinamen sind lang ("ACAD-TIS_260508_GR_1UG_Gesamtplan
   ex.dxf"). Ohne Umbruch schob der Pfad die Schrittleiste aus dem Bild. */
.topbar { flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 10px; }
.topbar .crumbs { flex: 1 1 240px; min-width: 0; }
.topbar .crumbs strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar .steps { flex-wrap: wrap; }
@media (max-width: 760px) {
  .step .why { display: none; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
}

/* Neutraler Hinweis (Erklaerung, keine Warnung) - im Entwurf nicht vorgesehen,
   aber viele Seiten erklaeren etwas, ohne dass etwas fehlt. */
.alert-info { border-color: var(--line); background: var(--surface); }
.alert-info > .i { color: var(--text-2); }
.alert-info strong { color: var(--text); }

/* Formulare - im Entwurf nicht gezeichnet, aus den Tokens abgeleitet */
.feld, input[type="text"], input[type="password"], input[type="number"],
input[type="search"], input[type="email"], select, textarea {
  min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong);
  border-radius: var(--r); background: var(--surface); color: var(--text);
  font: 400 var(--fs-md) var(--font-ui); }
textarea { padding: 8px 10px; min-height: 72px; line-height: var(--lh); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--link); width: 16px; height: 16px; margin: 0; }
input[type="file"] { font: inherit; color: var(--text-2); }
button { font: inherit; }
.feldgruppe { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.formzeile { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); }
.hilfe { font-size: var(--fs-xs); color: var(--text-3); }

/* Aufklappbare Tafel */
details.panel > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  cursor: pointer; list-style: none; font-weight: 600; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary .i { transition: transform var(--schnell, .12s); }
details.panel[open] > summary { border-bottom: 1px solid var(--line); }
details.panel[open] > summary .dreh { transform: rotate(90deg); }

/* Schluessel-Wert-Liste (Plan-, Quellen-, Projektangaben) */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; font-size: var(--fs-md); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: var(--sp-5); align-items: start; }
.panel-head h2, .panel-head h3 { font-size: var(--fs-lg); font-weight: 600; font-family: var(--font-ui); }
.panel-head .sub { font-size: var(--fs-sm); color: var(--text-2); }
.panel > .tbl-wrap { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.tbl td.wrap { white-space: normal; padding-top: 7px; padding-bottom: 7px; line-height: 1.4; height: auto; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-line); }
.leer { padding: 28px 16px; text-align: center; color: var(--text-2); }

/* Laeuft gerade: Dreher + Fortschritt */
.dreher { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong);
  border-top-color: var(--text); animation: dreh .8s linear infinite; flex: none; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dreher { animation: none; } }

/* Planliste: wie weit ist der Plan (4 Striche = 4 Schritte) */
.schrittbalken { display: inline-grid; grid-template-columns: repeat(4, 14px); gap: 3px; vertical-align: middle; margin-right: 6px; }
.schrittbalken i { height: 4px; border-radius: 2px; background: var(--line-strong); }
.schrittbalken i.on { background: var(--text-2); }
.drop .btn { flex: none; }

/* Das hidden-Attribut muss gegen Klassen mit display gewinnen - sonst stand
   "Wird übertragen …" schon vor dem Hochladen da. */
[hidden] { display: none !important; }

/* Raumauswahl: Summenleiste bleibt beim Scrollen unten sichtbar */
.merker { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-5); padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: 0 -8px 24px rgba(0,0,0,.18); }
.raumtabelle tr.raumzeile { cursor: pointer; }
.raumtabelle tr.raumzeile:has(input:checked) td { background: var(--row-open); }

/* Kopf einer Seite: bei schmalem Fenster rutschen die Knoepfe unter den Titel,
   statt den Untertitel auf eine Wortbreite zusammenzudruecken. */
.page-head { flex-wrap: wrap; }
.page-head > div:first-child { flex: 1 1 360px; min-width: 0; }

/* Kennzahlen: Trennlinien je Kachel statt Rasterluecke - sonst fuellt die
   Linienfarbe eine angebrochene letzte Reihe grau aus. */
.kpis { gap: 0; background: var(--surface); }
.kpis > .kpi { box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }

/* LVs am Projekt (M2): eine Karte je LV, gestrichelt fuer ein Gewerk ohne LV */
.lv-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.lv-karte h3 { font-size: var(--fs-md); }
.lv-karte-leer { border-style: dashed; background: transparent; }


/* ---------- 16 · Feinschliff 24.09.2026 -----------------------------------
   Wunsch: keine runden Ecken, mehr Luft, klarere Überschriften, weniger
   Farbe (Status bleibt), Dunkel heller, besser lesbar. Token oben angepasst,
   hier nur, was sich nicht über Token regeln ließ. */

/* Keine runden Ecken – auch nicht in fest eingetragenen Werten (Tags, Chips,
   Schrittleiste, Avatar). Bewusst global. */
*, *::before, *::after { border-radius: 0 !important; }

/* Lesbarkeit */
body { font-feature-settings: "cv11", "ss01", "tnum" 0; letter-spacing: .005em; }
.muted, .faint, .src, .hilfe { line-height: 1.5; }
.tbl .code, .mono { font-size: 13px; }

/* Überschriften: Größe und Gewicht klar gestuft, mehr Abstand darüber */
h1, h2, h3 { font-weight: 600; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: var(--fs-2xl); line-height: 1.15; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
.page-head { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); }
.page-head .sub { margin-top: 8px; font-size: var(--fs-md); }
.panel-head h2, .panel-head h3 { font-size: 17px; font-weight: 600; }
.caps { font-size: var(--fs-xs); letter-spacing: var(--track-caps); color: var(--text-2); }

/* Mehr Luft */
.page { gap: var(--sp-6); padding: 32px 40px 48px; }
.topbar { min-height: 64px; padding-left: 40px; padding-right: 40px; }
.panel-head { padding: 18px 24px; }
.panel-body { padding: 24px; }
details.panel > summary { padding: 18px 24px; }
.kpi { padding: 20px 24px; gap: 8px; }
.stack { gap: var(--sp-4); }
.grid-2 { gap: var(--sp-6); }
.row, .filters { gap: var(--sp-3); }
.formzeile { gap: var(--sp-4); }
.kv { gap: 12px 32px; }
.alert { padding: 16px 20px; gap: 14px; }
.drop { padding: 28px 32px; }
.sb { padding: 24px 16px 20px; gap: var(--sp-6); }
.sb-group { gap: 4px; }
.sb-link { min-height: 40px; padding: 0 12px; }
.tbl th { height: 40px; padding: 0 12px; font-size: var(--fs-xs); color: var(--text); }
.tbl td { padding: 0 12px; }
.tbl td.unit, .tbl th.unit { padding-left: 6px; }
.tbl .sec td { height: 36px; font-size: var(--fs-xs); color: var(--text-2); }
.tbl tr.proof td { padding: 8px 12px 24px; }
.btn { min-height: 40px; padding: 0 18px; }
.btn-sm { min-height: 34px; padding: 0 12px; }
.chip { min-height: 34px; padding: 0 14px; }
.tag { height: 24px; padding: 0 9px 0 7px; }
.feld, input[type="text"], input[type="password"], input[type="number"], select { min-height: 40px; padding: 0 12px; }

/* Weniger Farbe: Marke im Logo und im einen Hauptknopf je Seite (Entwurf 4) */
.btn-brand { border: 1px solid var(--brand-blue); background: var(--brand-blue); color: #FFFFFF; font-weight: 600; }
.btn-brand:hover { background: #1A30C4; border-color: #1A30C4; }
.btn-brand .xmark polygon { fill: currentColor; }
.bg-x { display: none; }
a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.sb-link, .sb-brand, .btn, .step, .chip, .crumbs a { text-decoration: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--text); }
.drop.is-over { border-color: var(--text); }
.search input, .search input[type="search"], .search input[type="text"] { border: 0; min-height: 0; padding: 0; background: transparent; outline: none; }
.search { min-height: 40px; padding: 0 12px; }


/* ---------- 17 · LV in vier Schritten (M3, Entwurf 4) --------------------
   Umfang · Vorschlag · Prüfen · Abgeben, dazu „···“ für Seltenes. Eine Fläche
   je Schritt, Reiter oben, genau ein Hauptknopf (.btn-brand). Nur über Token,
   damit Dunkel mitkommt. Lücken: Orange + Dreieck + Wort (Gestaltungsregel 1). */

.lv-schirm { background: var(--surface); border: 1px solid var(--line-strong); }
.lv-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 32px 0; }
.lv-kopf small { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--text-3); margin-bottom: 6px; }
.lv-kopf h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.lv-menu { min-height: 40px; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--text); border: 1px solid var(--line-strong); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.lv-menu:hover, .lv-menu.is-active { background: var(--surface-2); color: var(--text); }
.lv-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* Erklär-Chat (M7): Frage, Verlauf, Antwort als Text mit Zeilenumbrüchen */
.frage-form { display: grid; gap: 12px; max-width: 80ch; }
.frage-form textarea { width: 100%; font: inherit; }
.frage-verlauf { display: grid; max-width: 80ch; }
.frage-eintrag { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.frage-eintrag > p { margin: 0; }
.antwort-text { white-space: pre-line; line-height: 1.55; }

.reiter { display: flex; flex-wrap: wrap; gap: 8px 34px; margin: 0; padding: 20px 32px 0; list-style: none; border-bottom: 1px solid var(--line); }
.reiter a { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: -1px; font-size: var(--fs-md); color: var(--text-3); text-decoration: none; border-bottom: 3px solid transparent; }
.reiter a:hover { color: var(--text); }
.reiter .n { width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line-strong); color: var(--text-3); }
.reiter .fertig a { color: var(--text-2); }
.reiter .fertig .n { background: var(--surface-3); border-color: var(--surface-3); color: var(--text); }
.reiter .jetzt a { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.reiter .jetzt .n { background: var(--text); border-color: var(--text); color: var(--surface); }

.lv-inhalt { display: grid; gap: 28px; padding: 36px 32px; }
.frage { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; text-wrap: balance; }
.leise { margin: -12px 0 0; color: var(--text-2); max-width: 75ch; }
.cta-zeile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 8px; }
.cta-zeile form { display: inline; margin: 0; }
.nebentext { color: var(--text-3); font-size: var(--fs-sm); }
.aktion { padding: 0; border: 0; background: none; font-family: var(--font-ui); font-size: inherit; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; cursor: pointer; white-space: nowrap; }
.aktion:hover { text-decoration-color: currentColor; }

/* Umfang */
.angaben { display: grid; border-top: 1px solid var(--line); }
.angabe { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.angabe .was { font-weight: 700; }
.angabe .wert { color: var(--text-2); }
.angabe .wert b { color: var(--text); font-weight: 600; }
.angabe-voll { grid-column: 1 / -1; }
.chips-raum { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips-raum span { font-size: var(--fs-sm); padding: 3px 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }

/* Vorschlag */
.ablauf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ablauf > div { display: grid; gap: 4px; align-content: start; padding-top: 12px; border-top: 2px solid var(--text); }
.ablauf span { color: var(--text-2); font-size: var(--fs-sm); }
@media (max-width: 900px) { .ablauf { grid-template-columns: minmax(0, 1fr); } }

/* Prüfen */
.stand-zeile { display: flex; flex-wrap: wrap; gap: 12px 36px; align-items: baseline; margin-top: -8px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.stand-zeile b { margin-right: 8px; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); }
.stand-zeile .lk b { color: var(--warn); }
.stand-zeile .ok b { color: var(--ok); }
.pruefer-feld { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pruefer-feld input { max-width: 320px; }
.lv-liste { display: grid; gap: 36px; }
.luecken { border: 1px solid var(--warn-line); }
.luecken > h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 18px; background: var(--warn-bg); color: var(--warn); font-size: var(--fs-md); font-weight: 700; }
.luecken .zl { grid-template-columns: minmax(0, 1fr) 120px auto auto; padding: 14px 18px; }
.luecken .aufgeklappt { padding-left: 18px; }
.gruppen { display: grid; gap: 36px; }
.gkopf { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 0 12px 12px; border-bottom: 2px solid var(--text); }
.gkopf h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; }
.gkopf .zus { display: block; margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); }
.gruppe.is-zu .gkopf { border-bottom: 1px solid var(--line-strong); }
.zl { display: grid; grid-template-columns: 28px minmax(0, 1fr) 120px 110px 36px; gap: 14px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.zl .sys { display: grid; gap: 2px; min-width: 0; }
.zl .sys b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zl .sys small { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zl .mg { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Eventualposition (F42): „– m²“, darunter das Wort – keine Lücke, keine Menge */
.zl .mg .mg-art { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--text-3); }
.zl.is-offen { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); border-bottom-color: transparent; }
.klapp { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.klapp svg { transition: transform .12s; }
.klapp[aria-expanded="true"] svg { transform: rotate(90deg); }
.herk { justify-self: start; padding: 2px 8px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--surface); }
.herk-ki { border-style: dashed; }
.herk-hand { background: var(--surface-3); border-color: var(--surface-3); color: var(--text); }
/* M22: frühere Entscheidung des Büros – gilt, ist aber ungeprüft: doppelte Linie */
.herk-buero { border-style: double; border-width: 3px; padding: 0 6px; }
.haken-k { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.haken-k:hover { border-color: var(--ok); color: var(--ok); }
.haken-k.is-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); cursor: default; }
.knopf-lk { justify-self: end; padding: 8px 14px; border: 1px solid var(--warn); background: var(--surface); color: var(--warn); font: 600 var(--fs-sm) var(--font-ui); white-space: nowrap; cursor: pointer; }
.knopf-lk:hover { background: var(--warn-bg); }
.aufgeklappt { display: grid; gap: 12px; padding: 4px 12px 22px 54px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); border-bottom: 1px solid var(--line); color: var(--text-2); }
.aufgeklappt p { margin: 0; }
.aufgeklappt b { color: var(--text); font-weight: 600; }
.wandliste { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 1.1em; font-size: var(--fs-sm); }
.formzeile-lv { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.formzeile-lv input[type="text"] { flex: 1 1 240px; }

/* Planausschnitt mit Pfeil (M10): SVG aus der DXF, 3:2, weißer Plangrund */
.planbilder { display: grid; gap: 12px; }
.planbild { margin: 0; display: grid; gap: 6px; max-width: 760px; }
.planbild a { display: block; aspect-ratio: 3 / 2; max-width: 100%; border: 1px solid var(--line-strong); background: #fff; }
.planbild img { display: block; width: 100%; height: 100%; }
.planbild-warten { display: grid; place-items: center; height: 100%; color: var(--text-3); font-size: var(--fs-sm); background: var(--surface-2); }
.planbild figcaption { font-size: var(--fs-sm); color: var(--text-2); }
details.im-plan > summary { margin-bottom: 8px; }

/* Streichen (M11): Häkchen je Bauteil, Liste „Gestrichen“ unter den Gruppen */
fieldset.bauteilwahl { display: grid; gap: 6px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); }
fieldset.bauteilwahl legend { padding: 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
fieldset.bauteilwahl label { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--text); }
.gestrichen { margin-top: 28px; border: 1px solid var(--line-strong); }
.gestrichen > h3 { margin: 0; padding: 12px 18px; background: var(--surface-2); color: var(--text-2); font-size: var(--fs-md); font-weight: 700; }
.gestrichen .zl { grid-template-columns: minmax(0, 1fr) 120px auto auto; padding: 14px 18px 4px; border-bottom: 0; }
.gestrichen .zl .sys b { text-decoration: line-through; text-decoration-color: var(--text-3); }
.gestrichen .gestrichen-grund { padding: 0 18px 14px; border-bottom: 1px solid var(--line); }

/* Positionsauswahl (Prüfen, Weitere Werkzeuge): ganzer Kurztext, nach Gruppen */
.pa-panel { max-height: 24rem; overflow: auto; border: 1px solid var(--line-strong); background: var(--surface); }
.pa-gruppe { position: sticky; top: 0; z-index: 1; padding: 6px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.pa-eintrag { display: grid; gap: 2px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; white-space: normal; }
.pa-eintrag:hover, .pa-eintrag:focus-visible, .pa-eintrag.is-aktiv { background: var(--row-hover); outline: none; }
.pa-eintrag .pa-kurz { line-height: 1.35; }
.pa-eintrag small { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.pa-leer { padding: 10px 12px; color: var(--text-2); }

/* Abgeben */
.fertigblock { display: flex; gap: 18px; align-items: center; }
.fertigblock .haken { width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); }
.fertigblock.is-offen .haken { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.fertigblock b { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.fertigblock span { color: var(--text-2); }
.summenzeile { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; font-variant-numeric: tabular-nums; }
.summenzeile b { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.summenzeile small { margin-left: 4px; color: var(--text-3); }
.aenderung { display: grid; gap: 10px; padding: 16px 18px; background: var(--surface-2); color: var(--text-2); }
.aenderung b { color: var(--text); }
.aenderung ul { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: var(--fs-sm); }

/* Nur für Screenreader (z. B. „abgezeichnet“ am grünen Haken) */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ··· (Weitere Werkzeuge) */
.mehr-abschnitt { display: grid; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.mehr-abschnitt:first-of-type { padding-top: 0; border-top: 0; }
.mehr-abschnitt > h2 { margin: 0; font-size: var(--fs-xl); }
.mehr-abschnitt > .sub { margin-top: -8px; color: var(--text-2); max-width: 80ch; }
@media (max-width: 900px) {
  .angabe { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lv-kopf, .reiter, .lv-inhalt { padding-left: 20px; padding-right: 20px; }
}

/* ---------- 18 · Menü nach Modulen (M14, 26.09.2026) ----------------------
   Projektwahl, Leistungsphasen mit KG und Gewerken, Grundlagen, Admin.
   Grau heißt hier „im Projekt noch nichts dazu“ – für Menüpunkte erlaubt,
   für Lücken nie (Gestaltungsregel 1). „geplant“ ist ein Wort, keine Farbe. */
.sb { position: sticky; top: 0; height: 100vh; overflow-y: auto; gap: var(--sp-4); }
.sb-wahl { border: 1px solid var(--line); background: var(--bg); }
.sb-wahl > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px;
  align-items: center; padding: 8px 10px; cursor: pointer; }
.sb-wahl > summary::-webkit-details-marker { display: none; }
.sb-wahl > summary .caps { grid-column: 1 / -1; padding: 0; }
.sb-wahl-name { font-weight: 600; font-size: var(--fs-sm); color: var(--text); overflow-wrap: anywhere; line-height: 1.3; }
.sb-wahl[open] > summary .i { transform: rotate(180deg); }
.sb-wahl ul { list-style: none; margin: 0; padding: 4px 0; border-top: 1px solid var(--line); }
.sb-wahl li a { display: block; padding: 6px 10px; font-size: var(--fs-sm); color: var(--text-2); }
.sb-wahl li a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sb-wahl li a[aria-current] { color: var(--text); font-weight: 600; }

.sb-baum details > summary { list-style: none; cursor: pointer; }
.sb-baum details > summary::-webkit-details-marker { display: none; }
.sb-pfeil { transition: transform .12s ease; color: var(--text-3); }
.sb-baum details[open] > summary > .sb-pfeil { transform: rotate(90deg); }
.sb-phase > summary { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px;
  color: var(--text); font-weight: 600; font-size: var(--fs-sm); }
.sb-phase > summary:hover { background: var(--surface-2); }
.sb-phase.is-geplant > summary { color: var(--text-2); font-weight: 500; }
.sb-geplant { margin-left: auto; font-size: var(--fs-2xs); font-weight: 500; color: var(--text-3);
  border: 1px dashed var(--line-strong); padding: 0 5px; line-height: 18px; white-space: nowrap; }
.sb-plan { list-style: none; margin: 0 0 6px; padding: 2px 8px 4px 30px; display: grid; gap: 3px;
  font-size: var(--fs-xs); color: var(--text-3); }
.sb-plan a { font-size: var(--fs-xs); }
.sb-kg > summary { display: flex; align-items: baseline; gap: 6px; padding: 6px 8px 2px 18px;
  font-size: var(--fs-2xs, 11px); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sb-kg > summary .sb-pfeil { align-self: center; }
.sb-kg-name { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: var(--fs-xs); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.sb-kg ul { list-style: none; margin: 0; padding: 0 0 4px; }
.sb-kg li ul { padding: 0 0 2px; }
.sb-gewerk { display: flex; align-items: center; min-height: 30px; padding: 0 8px 0 38px; font-size: var(--fs-sm);
  color: var(--text); text-decoration: none; }
.sb-gewerk:hover { background: var(--surface-2); text-decoration: none; }
.sb-gewerk.is-leer { color: var(--text-3); }
.sb-gewerk.is-active, .sb-lv.is-active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.sb-lv { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 8px 0 50px; font-size: var(--fs-xs);
  color: var(--text-2); text-decoration: none; }
.sb-lv:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sb-lv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-link.is-geplant { color: var(--text-3); }
.sb-link .sb-geplant { margin-left: auto; }

/* Menüknopf: nur, wenn die Leiste nicht daneben passt */
.menue-knopf { display: none; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 var(--fs-sm) var(--font-ui); cursor: pointer; }
@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(var(--sidebar-w), 88vw);
    height: auto; padding: 20px 14px 16px; align-items: stretch; transform: translateX(-102%);
    transition: transform .16s ease; box-shadow: 0 0 0 100vmax transparent; }
  .app.menue-offen .sb { transform: none; box-shadow: 0 0 0 100vmax rgba(8, 21, 34, .35); }
  .sb .label, .sb .count, .sb .caps, .sb-note span, .sb-product { display: revert; }
  .sb-brand .sb-logo { display: block; }
  .sb-brand .sb-mark { display: none; }
  .sb .sb-link { width: auto; height: auto; min-height: 40px; padding: 0 10px; justify-content: flex-start; }
  .menue-knopf { display: inline-flex; }
}

/* Admin: Sprungleiste und die zwei Teile Plattform / Büro */
.admin-sprung { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); }
.admin-teil { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 2px solid var(--line-strong, var(--line)); }
.kennzahlen-zeile { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kennzahlen-zeile b { color: var(--text); font-family: var(--font-display); font-size: 20px; margin-right: 4px; }
.massen-kopf { cursor: pointer; font-weight: 600; padding: 6px 0; }
tr.is-zurueck td { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong, var(--line)); }
@media (prefers-reduced-motion: reduce) { .sb, .sb-pfeil { transition: none; } }

/* ---------- 19 · Büro, Person, kurze Menüpunkte (M15, 26.09.2026) -------------
   Oben das Büro (mit Wechsel, wenn man mehreren angehört), unten die Person.
   Lange Namen einzeilig mit Auslassung, der volle Name steht im Tooltip. */
.sb-buero { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: var(--fs-xs); color: var(--text-2); min-width: 0; }
details.sb-buero { display: block; padding: 0; }
details.sb-buero > summary { display: flex; align-items: center; gap: 8px; padding: 4px 10px; cursor: pointer; list-style: none; }
details.sb-buero > summary::-webkit-details-marker { display: none; }
details.sb-buero > summary:hover { background: var(--surface-2); color: var(--text); }
details.sb-buero[open] > summary > .i:last-child { transform: rotate(180deg); }
.sb-buero-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.sb-buero form { display: grid; padding: 4px 0; border: 1px solid var(--line); background: var(--bg); }
.sb-buero form button { text-align: left; padding: 6px 10px; border: 0; background: transparent; color: var(--text-2);
  font: 400 var(--fs-sm) var(--font-ui); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-buero form button:hover { background: var(--surface-2); color: var(--text); }
.sb-buero form button[aria-current] { color: var(--text); font-weight: 600; }
.sb-wahl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.sb-wahl li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-phase > summary .label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Seit M16 (Philipp): der Name zuerst, die Leistungsphase klein in Klammern dahinter.
   Kein Pfeil davor – Platz für den Namen; „geplant“ bleibt ein Wort, ohne Rahmen. */
.sb-lph { font-weight: 400; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.sb-phase .sb-geplant { border: 0; padding: 0; font-weight: 500; }
.sb-phase .sb-plan { padding-left: 32px; }
.sb-user { padding: 4px 6px 0; }
.sb-user-name { flex: 1; min-width: 0; display: grid; line-height: 1.25; color: var(--text); text-decoration: none; }
.sb-user-name:hover { text-decoration: none; }
.sb-user-name:hover span:first-child { text-decoration: underline; }
.sb-user-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-name .faint { font-size: var(--fs-xs); }
.sb-user form { margin: 0; }
.sb-abmelden { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; }
.sb-abmelden:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.massen td.mono { white-space: nowrap; }

/* Anmeldung und Einladungslink (M15): ohne Menü, eine Karte in der Mitte */
.tuer { min-height: 100vh; display: grid; place-content: center; gap: var(--sp-4); padding: 32px 16px; background: var(--bg); }
.tuer-karte { width: min(400px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: var(--sp-4);
  padding: 28px 28px 24px; background: var(--surface); border: 1px solid var(--line); }
.tuer-karte h1 { margin: 0; font-size: var(--fs-xl, 22px); }
.tuer-karte .btn-primary { width: 100%; }
.tuer-marke { display: flex; align-items: flex-end; gap: 8px; color: var(--text); }
.tuer-marke .sb-logo { width: 150px; height: auto; display: block; }
.tuer-marke .sb-product { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .28em; color: var(--text-2); }
.tuer-fuss { margin: 0; text-align: center; font-size: var(--fs-xs); color: var(--text-3); }
input[type="email"] { min-height: 40px; padding: 0 12px; }
.link-kopie { display: flex; gap: 8px; margin-top: 8px; }
.link-kopie input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: var(--fs-xs); }
p.pruefer-feld { margin: 0; }
.sb-link .count { white-space: nowrap; }

/* ---------- 20 · Suche und Langtext (M16, Philipp 27.09.2026) ------------------ */
.startsuche { display: flex; gap: 8px; align-items: stretch; max-width: 720px; }
.startsuche .search { flex: 1; min-height: 40px; }
.trefferliste { list-style: none; margin: 0; padding: 4px 16px 12px; display: grid; gap: 10px; }
.trefferliste li { line-height: 1.45; }
.trefferauszug { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.suchgruppe h2 .faint { font-weight: 500; font-size: var(--fs-md); }
/* Langtext je Zeile in Prüfen: aufgeklappt oder mit „Langtexte zeigen“ für alle */
.zl-langtext { display: none; margin: 0 0 6px 34px; padding: 8px 12px; border-left: 2px solid var(--line-strong, var(--line));
  font-size: var(--fs-sm); color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.zl.is-offen + .zl-langtext, .mit-langtext .zl-langtext { display: block; }
.langtext-schalter { display: flex; justify-content: flex-end; margin: -4px 0 8px; }

/* ---------- 21 · Das LV als Dokument (M16, Philipp) ----------------------------- */
.dokumentteil { display: grid; gap: 10px; padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.dokumentteil h3 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deckblatt-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.deckblatt-form .feldgruppe:has(textarea), .deckblatt-form .grundlage-feld, .deckblatt-form > div:last-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .deckblatt-form { grid-template-columns: minmax(0, 1fr); } }
.grundlage { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--text); }
.vorbemerkungen-text { width: 100%; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }
.lv-papier { max-width: 860px; background: var(--surface); border: 1px solid var(--line); padding: 32px 40px; display: grid; gap: 28px; }
@media (max-width: 760px) { .lv-papier { padding: 20px 16px; } }
.lv-dok-titel { margin: 0; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 600; letter-spacing: .04em; }
.lv-dok-untertitel { margin: 4px 0 16px; font-size: var(--fs-lg); font-weight: 600; }
.lv-dok-zwischen { margin: 18px 0 6px; font-weight: 600; }
.lv-felder, .lv-bieter { display: grid; grid-template-columns: 180px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.lv-felder dt, .lv-felder dd, .lv-bieter dt, .lv-bieter dd { margin: 0; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lv-felder dt, .lv-bieter dt { font-weight: 600; color: var(--text-2); }
.lv-felder dd { white-space: pre-line; }
.lv-bieter dd { min-height: 34px; }
.lv-bieter dd.is-stempel { min-height: 110px; }
.lv-vorbemerkungen h2, .lv-positionen h2 { margin: 0 0 8px; }
.lv-vorbemerkungen h3 { margin: 16px 0 6px; font-size: var(--fs-md); }
.lv-vorbemerkungen p { margin: 0 0 8px; max-width: 75ch; }
.lv-punkt { padding-left: 1.2em; text-indent: -1em; }
.lv-punkt::before { content: "– "; }
.lv-positionen h3 { margin: 18px 0 6px; font-size: var(--fs-md); border-bottom: 1px solid var(--line-strong, var(--line)); padding-bottom: 4px; }
.lv-pos { display: grid; grid-template-columns: 76px minmax(0, 1fr) 120px; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lv-oz { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); }
.lv-kurz { margin: 0; font-weight: 600; }
.lv-lang { margin: 4px 0 0; white-space: pre-line; font-size: var(--fs-sm); color: var(--text-2); }
.lv-menge { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .lv-pos { grid-template-columns: minmax(0, 1fr); } .lv-menge { text-align: left; } }
.planbezug-form { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px 14px; }
.planbezug-form > .row { grid-column: 1 / -1; }
.grundlage-vorschau { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.buero-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; max-width: 760px; }
.buero-form .feldgruppe:has(textarea), .buero-form > div:last-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .buero-form, .planbezug-form { grid-template-columns: minmax(0, 1fr); } }
details.vorlage { border-top: 1px solid var(--line); padding-top: 10px; }
details.vorlage > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stand-ausgaben { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.tbl td.nowrap { white-space: nowrap; }

/* ---------- 22 · Pläne als PDF, Planstände (M17) --------------------------------- */
.planbezug-kurz { margin: 2px 0 0 26px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-2); }
.tbl tr.is-haupt td { background: var(--surface-2, transparent); }
.planstand-form { margin-top: 8px; gap: 8px; }
.planstand-karte { font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }

/* ---------- 23 · Wandmengen nachvollziehbar (M18) --------------------------------- */
.wand-raeume { color: var(--text-3); font-size: var(--fs-xs); }
.wandliste li.is-treffer { background: var(--warn-bg); outline: 2px solid var(--warn-line); outline-offset: 2px; border-radius: 2px; }
.raumsuche { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); }
.raumsuche input { width: 9ch; }
.langtext-schalter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* ---------- 24 · Frühere Freitexte an der Lücke (M19) --------------------------------- */
.freitext-vorlagen { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.freitext-vorlagen .nebentext { margin: 0; }
.vorlage-zeile { align-items: flex-start; }
.vorlage-text { flex: 1 1 320px; display: grid; gap: 2px; min-width: 0; }
.vorlage-text small { color: var(--text-3); font-size: var(--fs-xs); }
.vorlage-zeile input[type="text"] { flex: 0 0 8em; }
/* M22: „Früher im Büro für diese Wand“ – derselbe ruhige Kasten wie die früheren Freitexte */
.buero-vorschlag { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.buero-vorschlag .nebentext { margin: 0; }
.buero-vorschlag small, .buero-vorschlag .faint { display: block; font-size: var(--fs-xs); }
/* Seit 29.09. (Eugen): Vorschläge zum Übernehmen farbig – Rahmen, Kopf mit Symbol und Wort */
.vorschlag-kasten { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--vorschlag-line);
  border-left: 4px solid var(--vorschlag); border-radius: var(--r); background: var(--vorschlag-bg); }
.vorschlag-kasten .nebentext { margin: 0; }
.vorschlag-kasten .nebentext b { color: var(--text); }
.vorschlag-kopf { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--vorschlag);
  font-size: var(--fs-sm); font-weight: 600; }
.lk-marken { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.buero-vorschlag small { color: var(--text-3); }
.buero-code { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; font-size: var(--fs-xs); color: var(--text-2); }
.buero-code .i { flex: none; margin-top: 1px; }
/* M22: Übersicht Büro-Gedächtnis */
.gedaechtnis-tbl { table-layout: fixed; min-width: 720px; }
.gedaechtnis-tbl .schalter { margin-top: 6px; }
.schluessel-klein { margin-top: 2px; font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
details.vorlage-lang > summary { cursor: pointer; font-size: var(--fs-xs); color: var(--text-2); }
details.vorlage-lang p { margin: 4px 0 0; white-space: pre-line; font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- 25 · Hersteller der Kataloge (M20) --------------------------------------- */
.hersteller { display: inline-flex; align-items: center; padding: 0 6px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; line-height: 1.6; white-space: nowrap; vertical-align: middle; }
.hersteller img { display: block; height: 14px; width: auto; }
.hersteller:has(img) { background: #fff; }
.hersteller-liste { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.hersteller-liste .anzahl { color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.gewerk-anteile { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-sm); color: var(--text-2); }
.gewerk-anteile span b { font-weight: 600; color: var(--text-1, inherit); font-variant-numeric: tabular-nums; }

/* ---------- 26 · KI-Hilfen (M25, Eugen 29./30.09.2026) ------------------------------ */
/* Abnahmeliste: Häkchen vorn, Vorschläge violett wie jeder Vorschlag zum Übernehmen */
.abnahme-tbl td { vertical-align: top; }
.abnahme-tbl .wahl, .merkmal-tbl .wahl { width: 36px; text-align: center; }
.abnahme-tbl .nebentext { margin: 4px 0 0; }
.abnahme-tbl td.code { white-space: nowrap; }
.abnahme-tbl td.code .faint { white-space: normal; max-width: 12ch; }
.abnahme-tbl .mono { white-space: nowrap; }
.abnahme-position { margin-top: 4px; font-size: var(--fs-sm); }
.abnahme-position b { font-weight: 600; }
.abnahme-knoepfe { align-items: center; }
.abnahme-knoepfe .nebentext { flex: 1 1 320px; margin: 0; }
.kopie-text { width: 100%; font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-sm);
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; resize: vertical; }
/* Zweitleser in „Prüfen“: Hinweise mit Sprung zur Zeile, erledigt/trifft nicht zu */
.zweitleser { margin-bottom: var(--sp-3); }
.zweitleser-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.zweitleser-liste li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; justify-content: space-between;
  padding: 6px 0; border-top: 1px solid var(--vorschlag-line); font-size: var(--fs-sm); }
.zweitleser-liste li.is-zu { opacity: .7; }
.zweitleser-liste li.is-zu .zweitleser-inhalt { text-decoration: line-through; text-decoration-color: var(--text-3); }
.zweitleser-inhalt { flex-basis: 100%; color: var(--text); }
.zweitleser-text { flex: 1 1 360px; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.zweitleser-art { font-size: var(--fs-xs); font-weight: 600; color: var(--vorschlag); }
.zweitleser-art.zweitleser-widerspruch { color: var(--warn); }
.zweitleser-knoepfe { display: flex; gap: 6px; flex: none; }
.zweitleser-veraltet { color: var(--warn); }
.zeile-block.is-angesprungen > .zl { outline: 2px solid var(--vorschlag); outline-offset: 2px; border-radius: var(--r); }
/* Merkmale mit Beleg: das Zitat im Text markiert */
.merkmal-tbl td { vertical-align: top; }
.merkmal-tbl .wert { white-space: nowrap; }
.merkmal-tbl .beleg { font-size: var(--fs-sm); color: var(--text-2); max-width: 46ch; }
.merkmal-tbl mark { background: var(--vorschlag-bg); color: var(--vorschlag); border-bottom: 2px solid var(--vorschlag-line); padding: 0 1px; }
