/* schwarz – Design
   Redaktions-Ästhetik: Papier, Tinte, schwarze Balken, eine Signalfarbe. */

/* ------------------------------------------------------------------ Schriften (lokal, OFL) */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-wght-normal.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; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-tight-latin-ext-wght-normal.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; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-400-normal.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; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-400-normal.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; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-400-italic.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; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-400-italic.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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-wght-normal.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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext-wght-normal.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; }

/* ------------------------------------------------------------------ Farben */
:root {
  --paper: #f3f1ec; --surface: #fbfaf7; --surface-2: #efece5; --ink: #0e0e0d; --ink-2: #2b2a27;
  --muted: #6d6a63; --line: #dfdbd1; --line-2: #cfcabd;
  --accent: #ff4d1a; --accent-ink: #ffffff; --accent-soft: #ffe2d6;
  --ok: #1d7a43; --warn: #a35c00; --err: #b3261e;
  --bar: #0e0e0d; --bar-text: #f3f1ec;
  --shadow: 0 1px 0 rgba(14,14,13,.04), 0 12px 40px -18px rgba(14,14,13,.25);
  --radius: 6px;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ZUGANG: #ffb3b3; --PERSON: #ffd3cc; --FIRMA: #d3e2ff; --ADRESSE: #ffe3bf; --ORT: #ffe3bf; --EMAIL: #d5f0d0;
  --TELEFON: #e6d9ff; --URL: #cdeeea; --IBAN: #fff0a8; --KREDITKARTE: #fff0a8; --ID: #e7e4dc;
  --IP: #e7e4dc; --GEBURTSDATUM: #ffd6ea; --SONSTIGES: #e7e4dc;
  color-scheme: light;
}
/* Dunkel: per System (wenn nicht ausdrücklich hell gewählt) oder ausdrücklich */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e0e0d; --surface: #161614; --surface-2: #1d1d1a; --ink: #f1eee7; --ink-2: #d8d4ca;
    --muted: #9b968b; --line: #2a2926; --line-2: #3a3833;
    --accent: #ff6a3d; --accent-ink: #160803; --accent-soft: #3a1a0f;
    --ok: #6fd393; --warn: #f0b04a; --err: #ff8a80;
    --bar: #f1eee7; --bar-text: #0e0e0d;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 50px -20px rgba(0,0,0,.8);
    --ZUGANG: #6e1f1f; --PERSON: #5b2a24; --FIRMA: #233a63; --ADRESSE: #5a3d17; --ORT: #5a3d17; --EMAIL: #24472a;
    --TELEFON: #3e2c63; --URL: #1c4a45; --IBAN: #574b12; --KREDITKARTE: #574b12; --ID: #34322d;
    --IP: #34322d; --GEBURTSDATUM: #5a2445; --SONSTIGES: #34322d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0e0e0d; --surface: #161614; --surface-2: #1d1d1a; --ink: #f1eee7; --ink-2: #d8d4ca;
    --muted: #9b968b; --line: #2a2926; --line-2: #3a3833;
    --accent: #ff6a3d; --accent-ink: #160803; --accent-soft: #3a1a0f;
    --ok: #6fd393; --warn: #f0b04a; --err: #ff8a80;
    --bar: #f1eee7; --bar-text: #0e0e0d;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 18px 50px -20px rgba(0,0,0,.8);
    --ZUGANG: #6e1f1f; --PERSON: #5b2a24; --FIRMA: #233a63; --ADRESSE: #5a3d17; --ORT: #5a3d17; --EMAIL: #24472a;
    --TELEFON: #3e2c63; --URL: #1c4a45; --IBAN: #574b12; --KREDITKARTE: #574b12; --ID: #34322d;
    --IP: #34322d; --GEBURTSDATUM: #5a2445; --SONSTIGES: #34322d;
    color-scheme: dark;
  }

/* ------------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }
::selection { background: var(--accent); color: var(--accent-ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ Logo */
.logo, .footer-logo { font: 800 22px/1 var(--sans); letter-spacing: -.04em; text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; }
.logo-bar { background: var(--bar); color: var(--bar-text); padding: 2px 5px 3px 3px; margin-left: 1px; border-radius: 2px; }

/* ------------------------------------------------------------------ Kopf */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px; transition: background-size .25s ease; }
.site-nav a:hover { background-size: 100% 1px; }

/* ------------------------------------------------------------------ Buttons */
.btn { font: 600 14px/1 var(--sans); border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); padding: 12px 18px; cursor: pointer; transition: transform .08s, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; transform: none; border-color: var(--line-2); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 5px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-primary.done { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.05); } }

/* Schwärzungsbalken: fährt bei Berührung von links nach rechts über den Button und invertiert,
   was er überstreicht (Fläche, Schrift, Icons) – beim Verlassen zieht er sich nach rechts zurück. */
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: -1px; background: #fff; mix-blend-mode: difference; pointer-events: none;
  transform: scaleX(0); transform-origin: right center; transition: transform .32s cubic-bezier(.7, 0, .2, 1); }
@media (hover: hover) {
  .btn:hover:not(:disabled)::after { transform: scaleX(1); transform-origin: left center; }
  .btn-ghost:hover { background: var(--surface-2); }
  /* Farbe bleibt, der Balken invertiert sauber */
  .btn-primary:hover, .site-nav a.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
  .btn:not(.btn-primary):not(.btn-ghost):hover { border-color: var(--line-2); }
}
.btn.swipe::after { animation: swipe .52s cubic-bezier(.7, 0, .2, 1); }
@keyframes swipe {
  0% { transform: scaleX(0); transform-origin: left center; }
  45% { transform: scaleX(1); transform-origin: left center; }
  55% { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}
.btn-primary.done::after { display: none; }
@media (prefers-reduced-motion: reduce) {
  .btn::after { transition: none; }
  .btn.swipe::after { animation: none; }
}
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 4px; }
.x:hover { color: var(--ink); background: var(--surface-2); }
.text-link { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.text-link::after { content: "→"; transition: transform .2s ease; }
.text-link:hover::after { transform: translateX(4px); }

/* ------------------------------------------------------------------ Hero */
main { padding: 0 clamp(16px, 4vw, 48px); }
.hero { max-width: 1320px; margin: 0 auto; padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.hero h1 { font: 400 clamp(54px, 7.6vw, 116px)/.92 var(--serif); letter-spacing: -.03em; margin: 0 0 28px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero h1 .w { display: inline-block; }
.hero-sub { max-width: 540px; margin: 0 0 32px; font-size: clamp(16px, 1.45vw, 18.5px); line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

/* Briefausschnitt mit Schwärzung */
.doc { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 26px 28px 18px;
  font: 400 13.5px/1.85 var(--mono); color: var(--ink-2); transform: rotate(1.2deg);
  box-shadow: 0 1px 0 rgba(14,14,13,.03), 0 30px 60px -36px rgba(14,14,13,.35); }
.doc-head { display: grid; gap: 2px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.doc p { margin: 0 0 12px; }
.doc figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); font: 500 10.5px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.r { position: relative; font-weight: inherit; white-space: nowrap; }
.r::after { content: "[" attr(data-l) "]"; position: absolute; inset: -1px -3px; background: var(--bar); color: var(--bar-text);
  border-radius: 2px; font: 500 .74em/1 var(--mono); display: flex; align-items: center; padding-left: 5px; overflow: hidden;
  clip-path: inset(0 0 0 0); }
.motion .doc .r::after { clip-path: inset(0 100% 0 0); animation: redact 11s cubic-bezier(.7,0,.2,1) infinite; }
.doc .d2::after { animation-delay: .25s !important; } .doc .d3::after { animation-delay: .5s !important; }
.doc .d4::after { animation-delay: .75s !important; } .doc .d5::after { animation-delay: 1s !important; }
.doc .d6::after { animation-delay: 1.25s !important; } .doc .d7::after { animation-delay: 1.5s !important; }
.doc .d8::after { animation-delay: 1.75s !important; }
@keyframes redact { 0%, 6% { clip-path: inset(0 100% 0 0); } 14%, 82% { clip-path: inset(0 0 0 0); } 92%, 100% { clip-path: inset(0 100% 0 0); } }

/* Überschrift baut sich auf */
.motion .hero h1 .w { opacity: 0; transform: translateY(.28em); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.motion .hero h1 .w2 { animation-delay: .08s; } .motion .hero h1 .w3 { animation-delay: .16s; } .motion .hero h1 .w4 { animation-delay: .24s; }
.motion .hero-sub, .motion .hero-actions { opacity: 0; animation: rise .9s .35s cubic-bezier(.2,.7,.2,1) forwards; }
.motion .hero-actions { animation-delay: .45s; }
.motion .doc { opacity: 0; animation: docIn 1.1s .3s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(.28em); } to { opacity: 1; transform: none; } }
@keyframes docIn { from { opacity: 0; transform: rotate(3deg) translateY(24px); } to { opacity: 1; transform: rotate(1.2deg); } }

/* ------------------------------------------------------------------ Arbeitsbereich */
.workspace { max-width: 1320px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 1px 0 rgba(14,14,13,.03), 0 24px 60px -40px rgba(14,14,13,.35); overflow: hidden; scroll-margin-top: 80px; }
.ws-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 6px 16px 0 20px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 26px; }
.tab { font: 600 14px/1 var(--sans); border: 0; background: transparent; color: var(--muted); padding: 16px 0 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .2s; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-n { font: 500 11px/1 var(--mono); color: var(--muted); }
.ws-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-bottom: 9px; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px; }
.seg button { font: 500 12px/1 var(--mono); border: 0; background: transparent; color: var(--muted); padding: 7px 10px; border-radius: 4px; cursor: pointer; transition: background .15s, color .15s; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.ki-chip { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--sans); border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-2); border-radius: 6px; padding: 8px 12px; cursor: pointer; }
.ki-chip:hover { border-color: var(--ink); }
.ki-dot { width: 7px; height: 7px; border-radius: 1px; background: var(--line-2); }
.ki-chip.on { border-color: var(--accent); }
.ki-chip.on .ki-dot { background: var(--accent); }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; }
.panel-grid > * { min-width: 0; }
.pane { display: flex; flex-direction: column; min-height: 460px; }
.pane + .pane { border-left: 1px solid var(--line); }
.pane-out { background: var(--paper); }
.pane-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px 20px; min-height: 52px; }
.pane-title { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pane-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pane-body { position: relative; flex: 1; display: flex; flex-direction: column; padding: 0 20px 20px; }
.editor-wrap { position: relative; flex: 1; display: flex; }
textarea { font: 400 14px/1.7 var(--mono); color: var(--ink); background: transparent; border: 0; resize: none; width: 100%; flex: 1;
  min-height: 380px; padding: 6px 0; outline: none; }
textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.pane-out textarea { color: var(--ink-2); }
.empty-state { position: absolute; inset: 24px 0 auto; display: grid; justify-items: start; gap: 10px; text-align: left; pointer-events: none;
  padding: 32px 28px; border: 1px dashed var(--line-2); border-radius: 6px; }
.empty-title { font: 400 30px/1.05 var(--serif); }
.empty-sub { color: var(--muted); font-size: 14px; }
.format-pills { display: flex; gap: 6px; margin-top: 6px; }
.format-pills span { font: 500 11px/1 var(--mono); padding: 5px 7px; border-radius: 3px; color: var(--muted); border: 1px solid var(--line-2); }
.review { flex: 1; min-height: 380px; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: 400 14px/1.75 var(--mono); padding: 6px 0; outline: none; }
.review mark { color: inherit; border-radius: 2px; padding: 1px 2px; cursor: pointer; transition: box-shadow .12s; }
.review mark:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.review mark.off { background: transparent !important; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.review.fresh mark:not(.off) { animation: markIn .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes markIn { from { background-color: transparent; box-shadow: inset 0 -2px 0 var(--ink); } }
.sel-btn { position: absolute; z-index: 5; font: 600 12px/1 var(--sans); background: var(--ink); color: var(--paper); border: 0;
  border-radius: 4px; padding: 8px 11px; cursor: pointer; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); transform: translate(-50%, -120%); }
.opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); padding: 0 8px; cursor: pointer; white-space: nowrap; }
.opt input { accent-color: var(--accent); }
.file-pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 8px; font-size: 13px;
  border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 4px 3px 4px; max-width: 100%; }
.file-pill #fileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-result { margin: 10px 0 0; font-size: 13px; line-height: 1.5; padding: 9px 12px 10px 34px; border-radius: 6px; position: relative;
  border: 1px solid var(--line-2); background: var(--surface); animation: fbIn .45s cubic-bezier(.2,.7,.2,1); }
.check-result::before { position: absolute; left: 11px; top: 9px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  font: 700 10px/1 var(--sans); color: #fff; }
.check-result.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.check-result.ok::before { content: "✓"; background: var(--ok); }
.check-result.warn { border-color: var(--warn); color: var(--warn); }
.check-result.warn::before { content: "!"; background: var(--warn); }

/* Vielleicht übersehen? */
.suspects { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--warn);
  border-radius: 8px; background: color-mix(in srgb, var(--warn) 6%, transparent); }
.sus-head { flex-basis: 100%; font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
.chip.sus { border-style: dashed; border-color: var(--warn); padding-right: 4px; }
.sus-add { border: 0; background: var(--ink); color: var(--paper); font: 600 12px/1 var(--sans); border-radius: 4px; padding: 6px 8px; cursor: pointer; }
.sus-link { color: var(--warn); }
.found-head .status { display: block; }
.action-info.sus-info { color: var(--warn); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Dateikarte (Schritt 2): ansehen, nachbessern, speichern */
.file-card { margin: 14px 20px 0; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  display: grid; gap: 10px; animation: fbIn .45s cubic-bezier(.2,.7,.2,1); }
.fc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fc-name { font: 600 14.5px/1.3 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.fc-opt { padding: 0; }
.file-card .check-result { margin: 0; }
.ic-eye { width: 16px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; }
.ic-eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; }
@media (max-width: 899px) {
  .file-card { margin: 12px 14px 0; }
  .fc-actions .btn { flex: 1 1 auto; padding: 11px 12px; font-size: 14px; }
}

/* Bezahlschranke (vorbereitet) */
.lic-status { margin: 0; font-size: 14px; line-height: 1.5; }
.pro-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }

/* Bereiche von Hand schwärzen */
.areas-dlg { width: min(1100px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: none; }
.areas-wrap { display: flex; flex-direction: column; height: 100%; }
.areas-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px 10px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.areas-head h2 { font: 400 26px/1 var(--serif); margin: 0; }
.areas-info { font-size: 13.5px; color: var(--muted); }
.areas-info b { color: var(--ink); }
.areas-head #areasCancel { margin-left: auto; }
.areas-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 12px; background: var(--surface-2); overflow: hidden; }
.areas-loading { color: var(--muted); font-size: 14px; }
.areas-page { position: relative; max-width: 100%; box-shadow: 0 10px 30px -14px rgba(0,0,0,.45); background: #fff; flex: none; }
.areas-stage.zoomed { display: block; overflow: auto; overscroll-behavior: contain; }
.areas-stage.zoomed .areas-page { max-width: none; margin: 0 auto; }
.areas-dlg.view .areas-layer { cursor: grab; }
.areas-dlg.view .areas-legend, .areas-dlg.view #areasUndo, .areas-dlg.view #areasFull { display: none; }
.areas-zoom { display: inline-flex; align-items: center; gap: 4px; }
.areas-zoom .btn { min-width: 38px; font-size: 17px; padding: 4px 8px 6px; }
.areas-zl { font: 500 12px/1 var(--mono); color: var(--muted); min-width: 44px; text-align: center; }
.areas-page img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; pointer-events: none; }
.areas-layer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.area-auto { position: absolute; background: rgba(14,14,13,.28); border-radius: 1px; pointer-events: none; }
.area-auto-g { background: repeating-linear-gradient(45deg, rgba(14,14,13,.28) 0 4px, rgba(14,14,13,.12) 4px 8px); }
.area-mine { position: absolute; background: #0e0e0d; border-radius: 1px; }
.area-ghost { background: rgba(14,14,13,.55); outline: 1.5px dashed #ff4d1a; }
.area-x { position: absolute; top: -10px; right: -10px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--accent);
  color: #fff; font: 700 14px/22px var(--sans); cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.areas-legend { margin: 0; padding: 8px 18px 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 10px; border-radius: 1px; }
.lg-auto { background: color-mix(in srgb, var(--ink) 35%, transparent); }
.lg-mine { background: #0e0e0d; outline: 1px solid var(--line-2); }
.lg-tip { margin-left: auto; }
.areas-tools { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; flex-wrap: wrap; }
.areas-pager { font-size: 13px; color: var(--muted); min-width: 90px; text-align: center; }
.areas-spacer { flex: 1; }
.areas-tools #areasPrev, .areas-tools #areasNext { min-width: 40px; font-size: 18px; padding-top: 4px; padding-bottom: 6px; }
@media (max-width: 899px) {
  .areas-dlg { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; margin: 0; border: 0; }
  .areas-head h2 { font-size: 22px; }
  .areas-info { order: 3; width: 100%; }
  .areas-head { padding: 12px 12px 8px 16px; gap: 4px 12px; }
  .areas-stage { padding: 8px; }
  .areas-legend { padding: 8px 14px 0; }
  .areas-tools { padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); gap: 6px; }
  .areas-pager { min-width: 0; font-size: 12.5px; }
  .areas-spacer { display: none; }
  .areas-tools #areasUndo { margin-left: auto; }
  .areas-tools #areasDone { flex: 1 1 100%; padding: 13px; font-size: 15px; margin-top: 2px; }
  .area-x { width: 28px; height: 28px; line-height: 28px; top: -14px; right: -14px; }
}

/* Datei vom Chatbot, zurückübersetzt */
.file-back { margin: 0 20px 10px; border: 1px solid var(--ink); border-radius: 6px; background: var(--surface); padding: 10px 10px 10px 12px;
  animation: fbIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes fbIn { from { opacity: 0; transform: translateY(6px); } }
.fb-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fb-kind { font: 600 10px/1 var(--mono); background: var(--ink); color: var(--paper); border-radius: 2px; padding: 4px 6px; text-transform: uppercase; }
.fb-name { font: 600 14px/1.3 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fb-count { font-size: 12.5px; color: var(--ok); white-space: nowrap; }
.fb-row .btn { margin-left: auto; flex: none; }
.fb-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.fb-note.warn { color: var(--warn); }
@media (max-width: 899px) { .file-back { margin: 0 14px 10px; } .fb-count { display: none; } }
@media (prefers-reduced-motion: reduce) { .file-back { animation: none; } }
.file-kind { font: 600 10px/1 var(--mono); background: var(--ink); color: var(--paper); border-radius: 2px; padding: 4px 6px; text-transform: uppercase; }

.found { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 14px 20px 18px; background: var(--surface); }
.found-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 2px; background: var(--ink);
  color: var(--paper); font: 600 10.5px/1 var(--mono); letter-spacing: 0; margin-left: 6px; }
.count:empty { display: none; }
.status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.status.warn { color: var(--warn); } .status.err { color: var(--err); } .status.ok { color: var(--ok); }
.found-head .status { margin-left: auto; }
.spinner { width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; font: 500 13px/1.2 var(--sans); padding: 4px 4px 4px 8px;
  border-radius: 4px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .12s, opacity .12s; }
.chip:hover { border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 1px; flex: none; outline: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.chip .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.chip .meta { font: 500 10px/1 var(--mono); color: var(--muted); }
.chip.off { opacity: .5; } .chip.off .txt { text-decoration: line-through; }
.chip .x { padding: 2px 5px; font-size: 11px; }
.chips.fresh .chip { animation: chipIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes chipIn { from { opacity: 0; transform: translateY(5px); } }
.add-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
input[type=text], input[type=url], input[type=password], select, .field textarea {
  font: 400 14px/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 5px; padding: 9px 12px; }
.add-row input { flex: 1; min-width: 180px; }
input:focus, select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* Typfarben */
.l-ZUGANG { background: var(--ZUGANG); } .l-PERSON { background: var(--PERSON); } .l-FIRMA { background: var(--FIRMA); } .l-ADRESSE { background: var(--ADRESSE); }
.l-ORT { background: var(--ORT); } .l-EMAIL { background: var(--EMAIL); } .l-TELEFON { background: var(--TELEFON); }
.l-URL { background: var(--URL); } .l-IBAN { background: var(--IBAN); } .l-KREDITKARTE { background: var(--KREDITKARTE); }
.l-ID { background: var(--ID); } .l-IP { background: var(--IP); } .l-GEBURTSDATUM { background: var(--GEBURTSDATUM); }
.l-SONSTIGES { background: var(--SONSTIGES); }

/* ------------------------------------------------------------------ Datei-Overlay */
.drop-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .15s; }
.drop-overlay.show { opacity: 1; pointer-events: auto; }
.drop-overlay-inner { display: grid; justify-items: center; gap: 8px; padding: 48px 64px; border: 1.5px dashed var(--ink); border-radius: 8px; background: var(--surface); }
.drop-icon { font-size: 40px; line-height: 1; }
.drop-title { font: 400 36px/1 var(--serif); }
.drop-sub { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ Inhaltssektionen */
.sec { max-width: 1320px; margin: clamp(80px, 11vw, 150px) auto 0; display: grid; grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(24px, 5vw, 80px); border-top: 1px solid var(--ink); padding-top: 22px; scroll-margin-top: 70px; }
.sec-head { position: sticky; top: 86px; align-self: start; }
.sec-no { display: block; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.sec h2 { font: 400 clamp(40px, 4.6vw, 64px)/.95 var(--serif); letter-spacing: -.02em; margin: 0; }
.sec-body { min-width: 0; max-width: 860px; }
.lede { font: 400 clamp(30px, 3.4vw, 46px)/1.06 var(--serif); letter-spacing: -.015em; margin: 0 0 34px; }
.prose p { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 20px; max-width: 680px; }
.pull { margin: 46px 0; padding: 0; font: italic 400 clamp(28px, 3vw, 40px)/1.12 var(--serif); letter-spacing: -.01em; }
.pull::before { content: ""; display: block; width: 56px; height: 10px; background: var(--bar); border-radius: 1px; margin-bottom: 20px; }
.redact-line .r::after { clip-path: inset(0 0 0 0); inset: -1px -1px; }
.motion .redact-line .r::after { clip-path: inset(0 100% 0 0); }
.motion .redact-line.in .r::after { animation: redactOnce .9s cubic-bezier(.7,0,.2,1) forwards; }
.redact-line .v2::after { animation-delay: .35s !important; } .redact-line .v3::after { animation-delay: .7s !important; }
.redact-line .v4::after { animation-delay: 1.05s !important; }
@keyframes redactOnce { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.sub { font: 650 19px/1.35 var(--sans); letter-spacing: -.01em; margin: 64px 0 18px; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
.roles > div { border-top: 1px solid var(--line-2); padding: 16px 0 24px; }
.roles h4 { font: 600 15.5px/1.3 var(--sans); margin: 0 0 6px; }
.roles p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.isnot { margin-top: 40px; border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 26px 18px; background: var(--surface); }
.isnot .sub { margin-top: 20px; }
.isnot ul { list-style: none; padding: 0; margin: 0; }
.isnot li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink-2); line-height: 1.55; }
.isnot li b { color: var(--ink); }
.back-up { margin-top: 32px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 16px; }
.step-n { font: 500 11px/1 var(--mono); color: var(--muted); letter-spacing: .1em; }
.steps h3, .trust-item h3 { font: 650 17px/1.3 var(--sans); margin: 12px 0 6px; letter-spacing: -.01em; }
.steps p, .trust-item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.trust-item { padding: 22px 24px 26px 0; border-bottom: 1px solid var(--line-2); }
.trust-item:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line-2); }
.trust-item h3 { margin-top: 0; }
.trust-item h3::before { content: ""; display: block; width: 28px; height: 8px; background: var(--bar); border-radius: 1px; margin-bottom: 16px; }
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.price-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 26px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.price-card.pro { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--ink); }
.price-card h3 { margin: 0; font: 400 30px/1.05 var(--serif); }
.price-card .price { margin: 0; font-size: 16px; color: var(--ink-2); }
.price-card .price b { font: 600 34px/1 var(--sans); color: var(--ink); margin-right: 4px; }
.price-card ul { margin: 6px 0 8px; padding-left: 20px; line-height: 1.75; color: var(--ink-2); flex: 1; }
.price-card .btn { align-self: flex-start; }
.price-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }
.faq details { border-top: 1px solid var(--line-2); padding: 2px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; list-style: none; font: 600 17px/1.4 var(--sans); padding: 16px 36px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 300 26px/1 var(--sans); color: var(--muted); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 720px; line-height: 1.6; }
.motion .faq details[open] p { animation: rise .45s ease both; }

/* Einblenden beim Scrollen */
.motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.motion .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ Fuß */
.site-footer { max-width: 1320px; margin: clamp(80px, 11vw, 150px) auto 0; padding: 22px clamp(16px, 4vw, 48px) 48px; border-top: 1px solid var(--ink);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 14px; box-sizing: content-box; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .muted { margin-left: auto; font-family: var(--serif); font-style: italic; font-size: 18px; }
.footer-logo { font-size: 18px; }
.site-footer .feedback { color: var(--ink); text-decoration: none; border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 11px; font-size: 13px; font-weight: 600; }
.site-footer .feedback:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ Dialog */
dialog { border: 1px solid var(--line-2); border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(14,14,13,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dlg-head { display: flex; align-items: center; padding: 20px 20px 8px 24px; }
.dlg-head h2 { font: 400 30px/1 var(--serif); margin: 0; }
.dlg-head .x { margin-left: auto; font-size: 16px; }
.dlg-tabs { display: flex; gap: 4px; padding: 8px 24px 0; border-bottom: 1px solid var(--line); }
.dlg-tab { font: 600 14px/1 var(--sans); border: 0; background: none; color: var(--muted); padding: 10px 2px 12px; margin-right: 16px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dlg-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.dlg-body { padding: 18px 24px; overflow: auto; display: grid; gap: 14px; }
.dlg-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); }
.dlg-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.field { display: grid; gap: 6px; }
.field label { font: 600 13px/1 var(--sans); }
.field textarea { min-height: 96px; font-family: var(--mono); font-size: 13px; resize: vertical; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: -6px; }
.ki-warn { font-size: 13px; background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ Ollama-Assistent */
.guide { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); padding: 14px 16px; display: grid; gap: 10px; }
.guide-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
.guide-head .muted { font-size: 13px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gstep { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; }
.gstep + .gstep { border-top: 1px dashed var(--line); }
.gmark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 var(--sans);
  border: 1.5px solid var(--line-2); color: var(--muted); background: var(--surface); }
.gstep.current .gmark { border-color: var(--ink); color: var(--ink); }
.gstep.done .gmark { background: var(--ok); border-color: var(--ok); color: #fff; }
.gtitle { font: 600 14px/26px var(--sans); }
.gstep.todo .gtitle { color: var(--muted); }
.gtitle .ok { font-weight: 500; font-size: 12px; color: var(--ok); margin-left: 6px; }
.gbody p { margin: 4px 0 8px; font-size: 13.5px; line-height: 1.5; }
.gbody .muted { font-size: 12.5px; }
.cmd { display: flex; align-items: center; gap: 6px; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 6px 6px 6px 12px; margin: 6px 0 8px; }
.cmd code { flex: 1; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.cmd .btn { color: var(--paper); flex: none; }
.cmd .btn:hover { background: color-mix(in srgb, var(--paper) 15%, transparent); }
.cmd .btn.done { background: var(--ok); color: #fff; }
.model-opts { display: grid; gap: 6px; margin: 4px 0 8px; }
.model-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); cursor: pointer; }
.model-opt:has(input:checked) { border-color: var(--ink); }
.model-opt input { margin-top: 3px; accent-color: var(--accent); }
.alt { margin: 4px 0 6px; font-size: 13px; }
.alt summary { cursor: pointer; color: var(--muted); }
.alt summary:hover { color: var(--ink); }
.cmd code { max-height: 220px; overflow: auto; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.guide-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.guide-os button { font-family: var(--sans); }

/* ------------------------------------------------------------------ Hinweise & Momente */
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 200; width: max-content; max-width: min(520px, calc(100vw - 24px));
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); font: 600 15px/1.35 var(--sans); padding: 14px 18px; border-radius: 8px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); transition: opacity .22s ease, transform .22s cubic-bezier(.2,.7,.2,1); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-icon { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--sans); }
.toast-info .toast-icon { border: 1.5px solid currentColor; }
.toast-info .toast-icon::before { content: "i"; }
.toast-ok .toast-icon { background: var(--ok); color: #fff; }
.toast-ok .toast-icon::before { content: "✓"; }
.toast-warn .toast-icon { background: var(--warn); color: #fff; }
.toast-warn .toast-icon::before { content: "!"; }
.toast-busy .toast-icon { border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .toast-busy .toast-icon { animation-duration: 2.4s; } }
.toast-text { min-width: 0; }

.moment { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 24px; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--paper) 55%, transparent); transition: opacity .25s ease; }
.moment.show { opacity: 1; pointer-events: auto; }
.moment-card { width: min(380px, 100%); background: var(--ink); color: var(--paper); border-radius: 12px; padding: 30px 28px 26px; text-align: center;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.6); transform: translateY(14px) scale(.97); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.moment.show .moment-card { transform: none; }
.moment-check { width: 56px; height: 56px; margin: 0 auto 14px; display: block; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.moment-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; opacity: .45; }
.moment-check path { stroke-dasharray: 36; stroke-dashoffset: 36; }
.moment.show .moment-check circle { animation: draw .6s .05s ease forwards; }
.moment.show .moment-check path { animation: draw .35s .45s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.moment-title { font: 400 34px/1.05 var(--serif); }
.moment-text { margin-top: 10px; font-size: 15px; line-height: 1.5; color: color-mix(in srgb, var(--paper) 78%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .moment-check circle, .moment-check path { stroke-dashoffset: 0; animation: none !important; }
  .moment-card { transition: none; }
}

/* ------------------------------------------------------------------ Eigene Auswahlfelder */
select.cs-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.cselect { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  font: 500 14.5px/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; }
.cselect:hover { border-color: var(--ink); }
.cselect[aria-expanded="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cs-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-caret { width: 8px; height: 8px; flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .7; }
.add-row .cselect { width: auto; min-width: 150px; }
.cs-pop { position: fixed; z-index: 300; max-height: min(360px, 60vh); overflow: auto; padding: 5px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 8px; box-shadow: 0 22px 50px -20px rgba(0,0,0,.45); animation: popIn .14s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px); } }
.cs-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; background: none;
  color: var(--ink); font: 500 14.5px/1.3 var(--sans); padding: 10px 12px; border-radius: 5px; cursor: pointer; }
.cs-opt:hover, .cs-opt:focus-visible { background: var(--surface-2); outline: none; }
.cs-opt[aria-selected="true"] { font-weight: 650; }
.cs-check { width: 14px; height: 8px; flex: none; }
.cs-opt[aria-selected="true"] .cs-check { border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg) translate(1px, -2px); }
.cs-backdrop { position: fixed; inset: 0; z-index: 299; background: rgba(14,14,13,.45); animation: fadeIn .18s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.cs-sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; max-height: 70dvh; border-radius: 14px 14px 0 0; border-bottom: 0;
  padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); animation: sheetUp .26s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.cs-sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 10px; }
.cs-title { font: 400 24px/1.1 var(--serif); padding: 2px 12px 10px; }
.cs-sheet .cs-opt { min-height: 52px; font-size: 16px; padding: 12px 14px; border-top: 1px solid var(--line); border-radius: 0; }
.cs-sheet .cs-opt:first-of-type { border-top: 0; }

/* ------------------------------------------------------------------ Rechtstexte */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) 0 0; }
.legal h1 { font: 400 clamp(40px, 6vw, 64px)/1 var(--serif); letter-spacing: -.02em; margin: 0 0 18px; }
.legal h2 { font: 650 18px/1.3 var(--sans); margin: 34px 0 8px; }
.legal p, .legal li { line-height: 1.65; color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal .lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.legal pre { white-space: pre-wrap; font: 12px/1.5 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 320px; overflow: auto; }
.back { margin-left: auto; color: var(--muted); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--ink); }

/* ------------------------------------------------------------------ Responsiv */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .doc { transform: none; max-width: 640px; }
  .motion .doc { animation-name: docInFlat; }
  @keyframes docInFlat { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .sec { grid-template-columns: 1fr; gap: 18px; }
  .sec-head { position: static; }
  .roles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .site-nav a:not(.nav-keep) { display: none; }
  .site-nav { gap: 16px; }
  .panel-grid { grid-template-columns: 1fr; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--line); }
  .pane { min-height: 0; }
  textarea, .review { min-height: 240px; }
  .pane-out textarea { min-height: 200px; }
  .ws-bar { padding: 0 14px; }
  .tabs { width: 100%; gap: 20px; }
  .ws-tools { margin-left: 0; width: 100%; justify-content: space-between; padding: 8px 0 10px; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item:nth-child(even) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .roles { grid-template-columns: 1fr; }
  .hero h1 { margin-bottom: 22px; }
  .doc { padding: 20px 18px 14px; font-size: 12.5px; }
  .pane-body, .found { padding-left: 16px; padding-right: 16px; }
  .empty-state { inset: 16px 0 auto; padding: 24px 18px; }
  .empty-title { font-size: 24px; }
  .site-footer .muted { margin-left: 0; width: 100%; }
  .tab .tab-n { display: none; }
  .panel-grid > .pane:first-child .pane-title { display: none; }
  .pane-head { padding-left: 10px; padding-right: 10px; }
  .pane-actions { margin-left: 0; width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .pane-out .pane-head { flex-wrap: wrap; row-gap: 6px; }
  .pane-out .pane-head .pane-title { display: inline; }
  .pane-out .pane-actions { width: auto; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .opt { padding: 0 4px; }
  .btn-sm { padding: 7px 9px; }
  .isnot { padding: 2px 18px 14px; }
  .prose p { font-size: 17px; }
}

/* ================================================================== App (app.html) */
.small { font-size: 13px; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--ink); }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
/* Hell/Dunkel-Symbol: halb gefüllter Kreis, je nach Modus */
.theme-icon { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
[data-mode="light"] .theme-icon { background: transparent; }
[data-mode="dark"] .theme-icon { background: currentColor; }

body.app { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px clamp(14px, 3vw, 28px);
  background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.app-header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stepper { list-style: none; display: flex; gap: 6px; margin: 0 auto; padding: 0; counter-reset: s; }
.stepper button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font: 600 13.5px/1 var(--sans);
  padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.stepper button:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.stepper button:disabled { opacity: .45; cursor: default; }
.stepper .sn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; border: 1px solid var(--line-2); font: 600 11px/1 var(--mono); }
.stepper button.active { color: var(--ink); }
.stepper button.active .sn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stepper button.done .sn { background: var(--surface-2); color: var(--ink); }
.stepper li + li::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--line-2); vertical-align: middle; margin-right: 6px; }

.app-shell { flex: 1; display: grid; grid-template-columns: 290px 1fr; min-height: 0; }
.sidebar { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: sticky; top: 57px; height: calc(100dvh - 57px); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 12px 20px; }
.side-head h2 { font: 400 26px/1 var(--serif); margin: 0; }
.vlist { list-style: none; margin: 0; padding: 0 8px; overflow: auto; flex: 1; }
.vitem { display: flex; align-items: flex-start; gap: 4px; border-radius: 6px; }
.vitem:hover { background: var(--surface-2); }
.vitem.active { background: var(--surface); box-shadow: inset 2px 0 0 var(--ink); }
.vopen { flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--ink); padding: 10px 6px 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.vtitle { font: 600 14px/1.3 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmeta { font-size: 12px; color: var(--muted); }
.vstatus.s-kopiert { color: var(--accent); font-weight: 600; }
.vstatus.s-erledigt { color: var(--ok); }
.vitem .x { margin-top: 8px; opacity: 0; }
.vitem:hover .x, .vitem.active .x { opacity: 1; }
.vempty { padding: 14px 12px; color: var(--muted); font-size: 14px; }
.side-foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

.stage { min-width: 0; display: flex; flex-direction: column; }
.step { flex: 1; min-height: 0; }
.stage .panel-grid { height: 100%; }
.stage .pane { min-height: 0; }
.stage textarea, .stage .review { min-height: 300px; }
#stepCheck .panel-grid, #stepAnswer .panel-grid { grid-template-rows: 1fr auto; min-height: calc(100dvh - 57px - 72px); }

/* Schritt 1: Einfügefläche */
.paste-zone { max-width: 860px; margin: clamp(24px, 5vw, 64px) auto 0; padding: 0 clamp(16px, 4vw, 32px) 32px; display: grid; gap: 16px; }
.paste-copy h1 { font: 400 clamp(38px, 5vw, 60px)/1 var(--serif); letter-spacing: -.02em; margin: 0 0 8px; }
.paste-copy p { margin: 0; font-size: 16px; }
#input { min-height: 260px; border: 1px dashed var(--line-2); border-radius: 6px; padding: 16px 18px; background: var(--surface); }
#input:focus { border-style: solid; border-color: var(--ink); }
.paste-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.banner { max-width: 860px; margin: 0 auto 24px; padding: 14px 18px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent-soft);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Schritt 2: Aufgaben */
.tasks { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 10px; }
.tasks button { font: 500 12.5px/1 var(--sans); border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 4px; padding: 7px 9px; cursor: pointer; white-space: nowrap; }
.tasks button:hover { border-color: var(--ink); }
.tasks button[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#customTask { margin-bottom: 10px; width: 100%; }
.opt-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 0 0 6px; cursor: pointer; }
.opt-row input { accent-color: var(--accent); }
.file-out { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }

/* Aktionsleiste */
.actionbar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 12px clamp(16px, 3vw, 24px); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.action-info { margin-right: auto; font-size: 13px; color: var(--muted); }
.actionbar .hidden { display: none !important; }

/* Daumenmenü */
.stepbar { display: none; }
.show-mobile { display: none; }
/* Symbole für Vorgänge / Mehr (Kopfzeile mobil) */
.bn-icon { width: 20px; height: 18px; position: relative; display: inline-block; }
.bn-list { border-bottom: 1.5px solid currentColor; height: 14px; }
.bn-list::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 1.5px; background: currentColor; box-shadow: 0 5px 0 currentColor; }
.bn-more::before { content: "···"; font: 700 18px/1 var(--sans); letter-spacing: 1px; position: absolute; inset: -2px 0 0; text-align: center; }
.bn-badge { position: absolute; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff;
  font: 700 10px/16px var(--sans); text-align: center; }

/* Einstellungen & Einrichtung */
.dlg-links { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.dlg-links a { color: var(--muted); }
.seg-wide { width: 100%; }
.seg-wide button { flex: 1; font-family: var(--sans); font-size: 13px; padding: 9px; }
.setup { width: min(620px, calc(100vw - 24px)); }
.setup .dlg-head { align-items: flex-start; }
.setup .dlg-head #setupSkip { margin-left: auto; margin-top: 4px; }
.setup .dlg-head h2 { margin-top: 6px; }
.setup-body h3 { font: 400 26px/1.1 var(--serif); margin: 0; }
.setup-body > p { margin: -4px 0 0; font-size: 14px; line-height: 1.55; }
.setup-foot { align-items: center; gap: 8px; }
.dots { display: flex; gap: 6px; margin-right: auto; }
.dots span { width: 18px; height: 4px; border-radius: 1px; background: var(--line-2); }
.dots span.on { background: var(--ink); width: 28px; }
.dots span.done { background: var(--muted); }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; background: var(--paper); }
.choice:hover { border-color: var(--ink); }
.choice.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.choice input { margin-top: 3px; accent-color: var(--ink); }
.choice-body { display: grid; gap: 3px; }
.choice-title { font: 600 15px/1.3 var(--sans); }
.choice-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.badge { font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--paper); border-radius: 2px; padding: 3px 5px; vertical-align: 2px; margin-left: 4px; }

/* ------------------------------------------------------------------ App mobil: Daumenbedienung */
@media (max-width: 899px) {
  .hide-mobile { display: none !important; }
  .app-header { gap: 10px; padding: 8px 14px; }
  .stepper { margin: 0 auto; gap: 2px; }
  .stepper .sl { display: none; }
  .stepper button { padding: 10px 7px; }
  .stepper li + li::before { width: 10px; margin-right: 2px; }
  .ki-chip { padding: 7px 9px; }
  .ki-chip #kiChipText { display: none; }

  .app-shell { display: block; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .stepper { display: none; }
  .sidebar { display: none; position: static; height: auto; border-right: 0; }
  .app-shell[data-view="liste"] .sidebar { display: flex; }
  .app-shell[data-view="liste"] .step { display: none; }
  .app-shell[data-view="liste"] .stage { display: contents; }
  .vitem .x { opacity: 1; }
  .side-head { padding-top: 22px; }

  .panel-grid { grid-template-columns: 1fr; }
  #stepCheck .panel-grid, #stepAnswer .panel-grid { min-height: 0; }
  .stage textarea, .stage .review { min-height: 200px; }
  .paste-zone { margin-top: 18px; }
  #input { min-height: 180px; }
  .paste-actions { display: none; } /* auf dem Handy übernimmt die Aktionsleiste */

  /* Infozeile über der Schrittleiste (Hauptknopf sitzt in der Schrittleiste) */
  .actionbar { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 6px 16px; min-height: 0;
    background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line); justify-content: space-between; }
  .actionbar #primaryAction { display: none; }
  .actionbar #secondaryAction { padding: 6px 4px; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
  .actionbar .action-info { font-size: 13px; }
  .actionbar:not(:has(#secondaryAction:not(.hidden))):has(#actionInfo:empty) { display: none; }
  .actionbar.desk-hide:not(body.kb-open *) { display: none; } /* Schritt 1: Knöpfe stehen im Feld */
  .actionbar .btn-lg { flex: 1; max-width: 360px; padding: 15px 18px; }
  .stage { padding-bottom: 72px; }

  /* Schrittleiste: der aktive Schritt ist der Hauptknopf */
  .stepbar { display: flex; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line-2); }
  .sb { position: relative; flex: 0 0 54px; min-width: 0; height: 52px; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--muted);
    font: 600 14px/1.1 var(--sans); cursor: pointer; overflow: hidden;
    transition: flex-grow .4s cubic-bezier(.2,.7,.2,1), flex-basis .4s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, border-color .25s, transform .08s; }
  .sb:active { transform: scale(.98); }
  .sb:disabled { opacity: .4; }
  .sb-n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line-2);
    font: 600 12px/1 var(--mono); }
  .sb-t { display: none; min-width: 0; text-align: left; }
  .sb-cap { font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
  .sb-act { font: 600 15.5px/1.15 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb.done { color: var(--ink); }
  .sb.done .sb-n { border-color: transparent; background: var(--surface-2); }
  .sb.active { flex: 1 1 auto; justify-content: flex-start; background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .sb.active .sb-n { background: var(--paper); color: var(--ink); border-color: var(--paper); }
  .sb.active .sb-t { display: grid; gap: 4px; }
  .sb.active:not(.has-act) .sb-act { display: none; }
  .sb.active:not(.has-act) .sb-cap { font: 600 14px/1 var(--sans); letter-spacing: 0; text-transform: none; opacity: 1; }
  .sb.active.has-act::after { content: ""; flex: none; margin-left: auto; width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor;
    transform: rotate(45deg); margin-right: 4px; }
  /* Schwärzungsbalken beim Antippen – wie bei den Knöpfen */
  .sb.active::before { content: ""; position: absolute; inset: 0; background: #fff; mix-blend-mode: difference; pointer-events: none;
    transform: scaleX(0); transform-origin: left center; }
  .sb.active.swipe::before { animation: swipe .52s cubic-bezier(.7, 0, .2, 1); }
  .app-shell[data-view="liste"] ~ .stepbar .sb { flex: 1 1 0; justify-content: flex-start; gap: 8px; padding: 0 10px; }
  .app-shell[data-view="liste"] ~ .stepbar .sb-t { display: grid; }
  .app-shell[data-view="liste"] ~ .stepbar .sb-cap { font: 600 12.5px/1 var(--sans); letter-spacing: 0; text-transform: none; opacity: 1; }
  .areas-zl { display: none; }
  .lg-tip { display: none; }

  /* Kopfzeile: Vorgänge und Mehr */
  .icon-btn.show-mobile { display: inline-grid; place-items: center; position: relative; }
  .icon-btn .bn-icon { width: 18px; }
  .icon-btn .bn-badge { top: -4px; left: auto; right: -4px; }
  .icon-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  body.kb-open .app-shell { padding-bottom: 0; }
  body.kb-open .stepbar { display: none; }

  /* Dialoge als Bogen von unten */
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 12px 12px 0 0; border-bottom: 0; }
  .dlg { max-height: 92dvh; }
  .dlg-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .actionbar.desk-hide { display: none; }
}

/* Footer: Kuvert-Empfehlung */
.footer-kuvert { flex-basis: 100%; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); padding-top: 14px; border-top: 1px solid var(--line); }
.footer-kuvert a { font-weight: 600; color: var(--ink); }
.kv-mark { width: 22px; height: 15px; flex: none; border: 1.5px solid var(--ink); border-radius: 2px; position: relative; overflow: hidden; }
.kv-mark::before { content: ""; position: absolute; left: -3px; right: -3px; top: -9px; height: 14px; border: 1.5px solid var(--ink); transform: rotate(45deg) scaleY(.7); transform-origin: center; border-radius: 1px; }
.after-steps { margin-top: 28px; }
.site-nav a.btn-primary { background: var(--ink); color: var(--paper); padding: 8px 13px; border-radius: 5px; }
@media (max-width: 820px) { .site-nav .btn-primary { padding: 8px 11px; } }

/* ------------------------------------------------------------------ Anleitung */
.guide-hero { max-width: 1320px; margin: 0 auto; padding: clamp(48px, 8vw, 104px) 0 0; }
.guide-hero h1 { font: 400 clamp(40px, 5.6vw, 80px)/.98 var(--serif); letter-spacing: -.025em; margin: 14px 0 22px; max-width: 1000px; }
.guide-hero h1 em { font-style: italic; color: var(--accent); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.toc a { font: 500 13px/1 var(--sans); text-decoration: none; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; }
.toc a:hover { border-color: var(--ink); color: var(--ink); }
.nlist { padding-left: 20px; margin: 0 0 20px; }
.nlist li { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin-bottom: 10px; max-width: 680px; }
.mock { margin: 28px 0 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); overflow: hidden; max-width: 720px; }
.mock-bar { display: flex; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 600 12px/1 var(--sans); color: var(--muted); }
.mock-step.on { color: var(--ink); }
.mock-body { padding: 16px 18px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.mock-body.mono { font-family: var(--mono); }
.mock-body.out { background: var(--paper); }
.mock-body.small { font-size: 12.5px; }
.mock-body mark { color: inherit; border-radius: 2px; padding: 1px 2px; }
.mock-split { display: grid; grid-template-columns: 1fr 1fr; }
.mock-split > * + * { border-left: 1px solid var(--line); }
.mock-chips, .mock-tasks { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
.mock-tasks { border-top: 0; border-bottom: 1px solid var(--line); }
.mock-chips span, .mock-tasks span { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--sans); border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 8px; }
.mock-chips i { width: 8px; height: 8px; border-radius: 1px; display: inline-block; }
.mock-chips .off { opacity: .5; text-decoration: line-through; }
.mock-tasks .on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 560px) { .mock-split { grid-template-columns: 1fr; } .mock-split > * + * { border-left: 0; border-top: 1px solid var(--line); } }


/* ------------------------------------------------------------------ Einfügefläche mit Knöpfen */
.input-wrap { position: relative; }
.input-wrap #input { width: 100%; display: block; }
.input-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; pointer-events: none; padding: 16px; }
.input-empty .btn, .input-empty .linkish { pointer-events: auto; }
.ie-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ie-actions .btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 18px; font-size: 15px; }
.ie-hint { font-size: 13.5px; color: var(--muted); }
.ic { width: 16px; height: 16px; flex: none; position: relative; display: inline-block; }
.ic-paste { border: 1.5px solid currentColor; border-radius: 2px; width: 13px; height: 15px; }
.ic-paste::before { content: ""; position: absolute; left: 2px; right: 2px; top: -3px; height: 4px; border: 1.5px solid currentColor; border-radius: 1px; background: inherit; }
.btn-primary .ic-paste::before { background: var(--ink); }
.ic-paste::after { content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 1.5px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.ic-file { border: 1.5px solid currentColor; border-radius: 2px; width: 13px; height: 16px; clip-path: polygon(0 0, 65% 0, 100% 30%, 100% 100%, 0 100%); }
.ic-file::after { content: ""; position: absolute; right: -1px; top: -1px; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.pane-actions .btn:has(.ic) { display: inline-flex; align-items: center; gap: 7px; }
.pane-actions .ic-file { width: 11px; height: 13px; }
textarea.autogrow { flex: none; resize: none; overflow: auto; min-height: 44px; font: 400 14.5px/1.45 var(--sans); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
textarea.autogrow:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

@media (max-width: 899px) {
  .toast { left: 12px; right: 12px; width: auto; max-width: none; transform: translateY(16px); bottom: calc(118px + env(safe-area-inset-bottom)); }
  .toast.show { transform: none; }
  body.kb-open .toast { bottom: calc(var(--kb, 0px) + 84px); }
  .moment { align-items: end; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .ki-chip { display: none; }
  .ie-actions .btn { padding: 14px 18px; }
  /* Tastatur offen: Leiste weg, Aktionsknopf direkt über der Tastatur */
  body.kb-open .actionbar { display: flex; bottom: var(--kb, 0px); padding: 10px 14px; }
  body.kb-open .actionbar #primaryAction:not(.hidden) { display: inline-block; }
  body.kb-open .actionbar.hidden { display: none; }
}


/* ------------------------------------------------------------------ Branchenpakete & Hinweise */
.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pkg { display: grid; gap: 3px; text-align: left; padding: 11px 13px 12px 38px; position: relative; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.pkg:hover { border-color: var(--ink); }
.pkg::before { content: ""; position: absolute; left: 13px; top: 13px; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 3px; }
.pkg.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.pkg.on::before { background: var(--ink); border-color: var(--ink); }
.pkg.on::after { content: ""; position: absolute; left: 17px; top: 15px; width: 5px; height: 8px; border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(45deg); }
.pkg-title { font: 600 14.5px/1.3 var(--sans); }
.pkg-hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hints { display: grid; gap: 8px; padding: 14px 20px 0; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--warn); border-radius: 6px;
  background: color-mix(in srgb, var(--warn) 10%, var(--surface)); font-size: 14px; line-height: 1.5; color: var(--ink); }
.hint-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #fff; display: grid; place-items: center; font: 700 12px/1 var(--sans); margin-top: 1px; }
@media (max-width: 899px) { .hints { padding: 12px 14px 0; } .pkgs { grid-template-columns: 1fr; gap: 6px; }
  .pkg { padding: 9px 12px 10px 36px; gap: 1px; } .pkg::before { top: 11px; left: 12px; } .pkg.on::after { top: 13px; left: 16px; }
  .pkg-title { font-size: 14px; } .pkg-hint { font-size: 12px; } }
