/* FluxDoc 0.1 · ruhig, hell, klar. Tokens aus der FluxDoc-Marke. */
@font-face { font-family: 'Jakarta'; src: url(fonts/jakarta-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Jakarta'; src: url(fonts/jakarta-latin-ext.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: 'DM Sans'; src: url(fonts/dmsans-latin.woff2) format('woff2'); font-weight: 100 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; src: url(fonts/dmsans-latin-ext.woff2) format('woff2'); font-weight: 100 1000; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); letter-spacing: -.02em; line-height: 1.2; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; color: var(--text); }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
small, .small { font-size: 16px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 600 16px/1.2 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease); }
.btn:hover { border-color: var(--faint); background: var(--sunken); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-accent); box-shadow: 0 1px 2px var(--accent-wash); }
.btn.primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--text); }
.btn.quiet:hover { background: var(--sunken); }
.btn.danger { color: var(--red); }
.btn.small { min-height: 32px; padding: 5px 11px; font-size: 14px; border-radius: 8px; }
.btn.big { min-height: 48px; padding: 12px 22px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.small svg { width: 16px; height: 16px; }
.icon-btn { width: 36px; min-height: 36px; padding: 0; }

/* Formulare */
label.field { display: block; }
.field-label { display: block; font-size: 14px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.field-help { display: block; font-size: 16px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--input-line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); font: 16px/1.4 var(--body); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
input[aria-invalid=true] { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 12%, transparent); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; flex: none; cursor: pointer; }
input[type=radio] { accent-color: var(--blue); }

/* Grundlayout */
.topbar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 24px; background: var(--white-strong);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 750 19px/1 var(--head); letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.brand b { color: var(--blue); font-weight: 750; }
.brand .ver { font: 600 16px/1 var(--body); color: var(--muted); border: 1px solid var(--line); padding: 3px 6px; border-radius: 999px; letter-spacing: 0; }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.who strong { color: var(--ink); font-weight: 600; }
.page { max-width: 1120px; margin: 0 auto; padding: 36px 24px 96px; }
.page.wide { max-width: 1240px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; max-width: 62ch; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: 24px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Anmeldung */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-art { background: linear-gradient(160deg, var(--side-deep) 0%, var(--accent) 100%); color: var(--on-accent); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .brand { color: var(--on-accent); }
.login-art .brand b { color: var(--accent-ink); }
.login-art h1 { color: var(--on-accent); font-size: 38px; max-width: 14ch; letter-spacing: -.03em; }
.login-art p { color: var(--accent-ink); max-width: 40ch; margin-top: 14px; font-size: 16px; }
.login-steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 12px; max-width: 420px; }
.login-steps li { display: flex; gap: 14px; align-items: center; color: var(--text); font-size: 16px; }
.login-steps span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--white-line); display: grid; place-items: center; font: 600 16px/1 var(--head); flex: none; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 24px; margin-bottom: 6px; }
.login-form .stack { margin-top: 28px; }

/* Hinweise */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--blue-50); color: var(--text); font-size: 16px; border: 1px solid var(--blue-100); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--blue); }
.notice.warn { background: var(--amber-50); border-color: var(--amber-line); }
.notice.warn svg { color: var(--amber); }
.notice.error { background: var(--red-50); border-color: var(--error-line); color: var(--error); }
.notice.error svg { color: var(--red); }
.notice.ok { background: var(--green-50); border-color: var(--safe-line); }
.notice.ok svg { color: var(--green); }
.error-text { color: var(--red); font-size: 16px; margin-top: 6px; display: block; }

/* Status-Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font: 600 14px/1 var(--body); white-space: nowrap; background: var(--sunken); color: var(--text); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.blue { background: var(--blue-50); color: var(--blue-600); }
.chip.green { background: var(--green-50); color: var(--green); }
.chip.amber { background: var(--amber-50); color: var(--amber); }
.chip.red { background: var(--red-50); color: var(--red); }
.chip.plain::before { display: none; }
.chip.live::before { animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .2; } }

/* Übersicht */
.setup-list { display: grid; gap: 12px; }
.setup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 22px; text-decoration: none; color: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.setup-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.setup-row h3 { font-size: 17px; }
.setup-row .meta { margin-top: 4px; font-size: 16px; color: var(--muted); }
.stats { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.stat { font-size: 16px; color: var(--muted); }
.stat b { font: 700 16px/1 var(--head); color: var(--ink); margin-right: 4px; }
.stat.attn b { color: var(--blue-600); }
.empty { text-align: center; padding: 64px 24px; }
.empty h2 { font-size: 24px; }
.empty p { max-width: 52ch; margin: 10px auto 0; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 36px auto 32px; max-width: 760px; text-align: left; counter-reset: how; }
.how div { padding: 0 20px; border-left: 1px solid var(--line); }
.how div:first-child { border-left: 0; }
.how b { display: block; font: 700 16px/1 var(--head); color: var(--blue-600); margin-bottom: 8px; }
.how span { font-size: 16px; color: var(--text); }

/* Schritte */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.steps li + li::before { content: ''; width: 28px; height: 1px; background: var(--line-strong); margin-right: 2px; }
.steps .dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: 700 16px/1 var(--head); background: var(--surface); }
.steps .on { color: var(--ink); }
.steps .on .dot { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.steps .done .dot { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-600); }

/* Upload */
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; min-height: 280px; padding: 32px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface); cursor: pointer; transition: border-color .16s var(--ease), background .16s var(--ease); }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-50); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; margin: 0 auto; }
.drop .ico svg { width: 24px; height: 24px; }
.drop strong { font: 650 16px/1.3 var(--head); display: block; }
.drop.compact { min-height: 0; padding: 18px 20px; grid-template-columns: auto minmax(0, 1fr) auto; text-align: left; gap: 16px; justify-items: start; }
.drop.compact > .btn { justify-self: end; }
.drop.compact strong, .drop.compact span.small { display: block; }
.drop.compact .ico { margin: 0; width: 40px; height: 40px; }
.file-chosen { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.file-chosen .ico { width: 44px; height: 44px; border-radius: 10px; background: var(--sunken); display: grid; place-items: center; color: var(--muted); flex: none; }
.file-chosen .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wizard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.example { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 500 16px/1.3 var(--body); color: var(--text); cursor: pointer; text-align: left; }
.example:hover { border-color: var(--blue); color: var(--blue-600); }

/* Vorschau des Beispiels */
.preview { position: sticky; top: 80px; }
.pages { display: grid; gap: 14px; }
.page-img { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-1); overflow: hidden; line-height: 0; }
.page-img img { width: 100%; height: auto; display: block; }
.page-img .no { position: absolute; top: 8px; right: 8px; font: 600 16px/1 var(--body); color: var(--muted); background: var(--white-strong); border: 1px solid var(--line); padding: 4px 7px; border-radius: 999px; line-height: 1; }
.mark { position: absolute; border-radius: 3px; background: var(--accent-wash); box-shadow: 0 0 0 1.5px var(--accent-wash-strong); pointer-events: none; transition: background .2s var(--ease), box-shadow .2s var(--ease); }
.mark.on { background: var(--marker-wash); box-shadow: 0 0 0 2px var(--unsure), 0 0 0 6px var(--marker-wash-soft); }
.mark.dim { background: transparent; box-shadow: 0 0 0 1px var(--accent-wash); }

/* Feldvorschlag */
.fgroup + .fgroup { margin-top: 28px; }
.fgroup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fgroup-head h3 { font-size: 16px; text-transform: none; }
.flist { display: grid; gap: 8px; }
.frow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s var(--ease), background .15s var(--ease); }
.frow.on { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); background: var(--sunken); }
.frow.hl { border-color: var(--unsure); box-shadow: 0 0 0 3px var(--marker-wash-soft); }
.frow > input[type=checkbox] { margin-top: 11px; }
.frow-main { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px; }
.frow-main input, .frow-main select { min-height: 38px; font-size: 16px; }
.frow-name { font-weight: 600; }
.frow-foot { grid-column: 1 / -1; display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; font-size: 16px; color: var(--muted); }
.frow-foot .ex { color: var(--ink); background: var(--sunken); border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow-foot label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.frow-foot input[type=checkbox] { width: 16px; height: 16px; }
.frow details { grid-column: 1 / -1; }
.frow summary { cursor: pointer; font-size: 16px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.frow summary::-webkit-details-marker { display: none; }
.frow summary:hover { color: var(--ink); }
.frow details textarea { margin-top: 8px; min-height: 64px; font-size: 16px; }
.frow .reason { grid-column: 1 / -1; font-size: 16px; color: var(--muted); margin-top: -2px; }
.sticky-foot { position: sticky; bottom: 0; z-index: 10; margin-top: 24px; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.sticky-foot .inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px 12px 18px; box-shadow: var(--shadow-2); flex-wrap: wrap; }

.instruction { white-space: pre-wrap; font: 16px/1.6 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text); background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; max-height: 420px; overflow: auto; }

/* Lade-Zustände */
.skel { background: linear-gradient(90deg, var(--sunken) 25%, var(--surface) 50%, var(--sunken) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-row { height: 64px; }
.thinking { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--blue-100); border-top-color: var(--blue); animation: spin .8s linear infinite; flex: none; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; border: 0; background: none; padding: 12px 14px; font: 600 16px/1 var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); }
.tabs button[aria-selected=true]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.tabs .count { font: 700 14px/1 var(--body); background: var(--blue); color: var(--on-accent); border-radius: 999px; padding: 3px 6px; }
.tabs .count.grey { background: var(--sunken); color: var(--muted); }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { text-align: left; font: 600 14px/1.2 var(--body); color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.link { cursor: pointer; }
.table tr.link:hover td { background: var(--sunken); }
.table .fname { font-weight: 600; color: var(--ink); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.filter { display: flex; gap: 6px; }
.filter button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 600 16px/1 var(--body); color: var(--text); cursor: pointer; }
.filter button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--on-accent); }

/* Prüfansicht */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 440px; height: calc(100vh - 60px); }
.review-doc { overflow: auto; background: var(--sunken); padding: 20px 28px 60px; }
.review-doc .pages { max-width: 900px; margin: 0 auto; }
.review-doc.z125 .pages { max-width: 1125px; }
.review-doc.z150 .pages { max-width: 1350px; }
.review-bar { position: sticky; top: -20px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -20px -28px 16px; padding: 10px 28px; background: var(--white-strong); backdrop-filter: blur(6px); }
.review-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--surface); min-height: 0; }
.review-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.review-head .fname { font: 650 16px/1.3 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-fields { flex: 1; overflow: auto; padding: 8px 22px 24px; }
.review-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--sunken); }
.vfield { padding: 14px 0; border-bottom: 1px solid var(--line); }
.vfield:last-child { border-bottom: 0; }
.vfield-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.vfield-top .field-label { margin: 0; }
.vfield .req { color: var(--red); margin-left: 2px; }
.vfield .src { border: 0; background: none; padding: 0; font: 600 16px/1.2 var(--body); color: var(--blue-600); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.vfield .src:hover { text-decoration: underline; }
.vfield .src.none { color: var(--muted); cursor: default; text-decoration: none; }
.vfield.active input:not([type=checkbox]) { border-color: var(--unsure); box-shadow: 0 0 0 3px var(--marker-wash-soft); }
.vfield.unclear input:not([type=checkbox]) { border-color: var(--amber-line); background: var(--check-bg); }
.vfield-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 7px; font-size: 16px; color: var(--muted); flex-wrap: wrap; }
.vfield-sub label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--text); }
.vfield-sub input[type=checkbox] { width: 15px; height: 15px; }
.changed { color: var(--amber); font-weight: 600; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--blue-600); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.flag { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); font-weight: 600; font-size: 14px; }
.flag svg { width: 14px; height: 14px; }
.vfield-top .flag { margin-left: auto; }
.quote { margin-top: 6px; font-size: 16px; color: var(--muted); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-switch { display: none; }

/* Export */
.export-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.col-list { display: grid; gap: 6px; }
.col-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.col-item.off { background: var(--bg); }
.col-item.off .col-name { color: var(--muted); }
.col-name { font-weight: 600; font-size: 16px; }
.col-name small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.col-move { display: flex; gap: 2px; }
.col-move .btn { width: 30px; min-height: 30px; padding: 0; }
.formats { display: grid; gap: 8px; }
.format { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.format:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.format b { display: block; font-size: 16px; }
.format span { font-size: 16px; color: var(--muted); }
.format input { margin-top: 3px; }
.preview-table { font-size: 16px; }
.preview-table td, .preview-table th { padding: 8px 12px; white-space: nowrap; }

/* Verbessern */
.corr { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.corr:last-child { border-bottom: 0; }
.corr .what { font-weight: 600; }
.corr .file { color: var(--muted); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corr .vals { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.old { text-decoration: line-through; color: var(--muted); }
.new { color: var(--green); font-weight: 600; }
.diff { display: grid; gap: 12px; }
.diff-item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--surface); }
.diff-item h4 { font: 650 16px/1.3 var(--head); margin-bottom: 8px; }
.diff-item .before { font-size: 16px; color: var(--muted); padding: 8px 10px; background: var(--red-50); border-radius: 6px; }
.diff-item .after { font-size: 16px; color: var(--ink); padding: 8px 10px; background: var(--green-50); border-radius: 6px; margin-top: 6px; }
.diff-item .why { font-size: 16px; color: var(--muted); margin-top: 8px; }
.score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 22px; }
.score .side { text-align: center; }
.score .big { font: 750 40px/1 var(--head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score .lbl { font-size: 14px; color: var(--muted); margin-top: 6px; }
.score .arrow { color: var(--faint); }
.score .better .big { color: var(--green); }
.score .worse .big { color: var(--red); }
.progress { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s var(--ease); }
.cmp-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cmp-list li { min-width: 0; }
.export-grid > * { min-width: 0; }
.cmp-list li { border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; background: var(--surface); }
.cmp-list .fname { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-vals { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 16px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.cmp-vals .ok { color: var(--green); font-weight: 600; } .cmp-vals .bad { color: var(--red); font-weight: 600; }
.cmp-vals .muted { flex-basis: 100%; font-size: 16px; }
fieldset legend.field-label { padding: 0; margin-bottom: 8px; }
.cmp td.ok { color: var(--green); }
.cmp td.bad { color: var(--red); }

/* Fassungen */
.timeline { display: grid; gap: 12px; }
.ver { padding: 18px 20px; }
.ver-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ver-head h3 { font-size: 16px; }
.ver p { margin-top: 6px; font-size: 16px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 14px; padding: 3px 9px; border-radius: 6px; background: var(--sunken); color: var(--text); }
details.more summary { cursor: pointer; font-size: 16px; color: var(--blue-600); margin-top: 10px; font-weight: 600; }

/* Dialog und Meldungen */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--on-accent); padding: 12px 16px; border-radius: 12px; font-size: 16px; box-shadow: 0 10px 30px -10px var(--overlay-strong); animation: rise .28s var(--ease); }
.toast.error { background: var(--error); }
.toast svg { width: 18px; height: 18px; flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px var(--overlay); color: var(--ink); }
dialog::backdrop { background: var(--overlay); }
dialog .dlg { padding: 24px; }
dialog h2 { margin-bottom: 8px; }
.kbd { font: 600 14px/1 var(--body); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--muted); background: var(--surface); }


/* Vorlagen */
.tpl-set { border: 0; padding: 0; margin: 0; }
.tpls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tpl { position: relative; display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.tpl:hover { border-color: var(--faint); }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl b { display: block; font-size: 16px; }
.tpl span { font-size: 16px; color: var(--muted); }
.tpl.on { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); background: var(--sunken); }
.tpl:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Gefunden-Hinweis und Erscheinen der Felder */
.found-head { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--green-50); border: 1px solid var(--safe-line); margin-bottom: 18px; font-size: 16px; }
.found-head svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 2px; }
.reveal { animation: appear .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.mark.reveal { animation: glow .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } }
@keyframes glow { 0% { opacity: 0; transform: scale(1.12); } 40% { opacity: 1; background: var(--marker-wash); box-shadow: 0 0 0 2px var(--unsure); } 100% { opacity: 1; } }
.scanning .page-img::after { content: ''; position: absolute; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, transparent, var(--accent-wash) 70%, var(--accent-wash-strong)); border-bottom: 2px solid var(--accent-wash-strong); animation: scan 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { to { top: 100%; } }

/* Feld-Editor */
.editor .fgroup-head h3 { font-size: 16px; }
.cols { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.col { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 6px; padding: 10px 12px 10px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-1); transition: box-shadow .16s var(--ease), border-color .16s var(--ease); }
.col.hl { border-color: var(--unsure); box-shadow: 0 0 0 3px var(--marker-wash-soft); }
.col.dragging { position: relative; z-index: 3; border-color: var(--blue); box-shadow: 0 14px 30px -12px var(--overlay-strong); transition: none; }
.grip { width: 32px; min-height: 38px; border: 0; background: none; border-radius: 6px; cursor: grab; touch-action: none; display: grid; place-items: center; }
.grip span { width: 10px; height: 16px; background: radial-gradient(circle, var(--faint) 1.3px, transparent 1.5px) 0 0 / 5px 5px; }
.grip:hover { background: var(--sunken); }
.dragging .grip { cursor: grabbing; }
.col-line { display: grid; grid-template-columns: minmax(0, 1fr) 118px 36px; gap: 8px; align-items: center; }
.col-line input, .col-line select { min-height: 38px; font-size: 16px; }
.col-name { font-weight: 600; }
.col-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 16px; color: var(--muted); margin-top: 7px; }
.col-meta .ex { color: var(--ink); background: var(--sunken); border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.col-meta label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.col-meta input[type=checkbox] { width: 16px; height: 16px; }
.key code { font: 16px/1.2 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text); background: var(--sunken); padding: 2px 6px; border-radius: 5px; }
.keyedit { display: inline-flex; align-items: center; gap: 8px; }
.keyedit input { width: 220px; min-height: 32px; padding: 4px 8px; font: 16px ui-monospace, 'SF Mono', Menlo, monospace; }
.col details summary { cursor: pointer; font-size: 16px; color: var(--muted); margin-top: 6px; }
.col details textarea { margin-top: 8px; min-height: 64px; font-size: 16px; }
.pool { display: grid; gap: 6px; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--sunken); }
.prow-main { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-width: 0; }
.prow-main b { font-size: 16px; }
.prow-main .ex { font-size: 16px; background: var(--sunken); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; }

/* Denkstufe */
.level { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.lv { position: relative; display: grid; gap: 2px; text-align: center; padding: 10px 8px; cursor: pointer; background: var(--surface); border-right: 1px solid var(--line); transition: background .16s var(--ease); }
.lv:last-child { border-right: 0; }
.lv input { position: absolute; opacity: 0; pointer-events: none; }
.lv b { font-size: 16px; }
.lv span { font-size: 16px; color: var(--muted); }
.lv.on { background: var(--blue); }
.lv.on b, .lv.on span { color: var(--on-accent); }
.lv:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: -3px; }
.lv-info { margin-top: 10px; }
.lv-info p { font-size: 14px; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: 500 14px/1.3 var(--body); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--blue); color: var(--blue-600); }
.field-help code { font: 16px ui-monospace, 'SF Mono', Menlo, monospace; background: var(--sunken); padding: 1px 5px; border-radius: 4px; color: var(--ink); overflow-wrap: anywhere; }
.second { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 7px; font-size: 16px; color: var(--amber); background: var(--amber-50); border-radius: 6px; padding: 5px 8px; }
.second svg { width: 14px; height: 14px; flex: none; }
.second b { color: var(--ink); }
details.more summary { cursor: pointer; }

@media (max-width: 980px) { .tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-line { grid-template-columns: minmax(0, 1fr) 36px; }
  .col-line select { grid-column: 1 / 2; grid-row: 2; }
  .keyedit input { width: 160px; }
}

@media (max-width: 980px) {
  .wizard, .export-grid { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .review { grid-template-columns: minmax(0, 1fr); height: auto; }
  .review-doc { max-height: none; padding: 12px 12px 24px; }
  .review-bar { margin: -12px -12px 12px; padding: 8px 12px; top: 60px; }
  .review-side { border-left: 0; border-top: 1px solid var(--line); }
  .review-fields { overflow: visible; }
  .review-foot { position: sticky; bottom: 0; }
  .mobile-switch { display: flex; position: sticky; top: 60px; z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-switch button { flex: 1; border: 0; background: none; padding: 12px; font: 600 16px/1 var(--body); color: var(--muted); }
  .mobile-switch button[aria-selected=true] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
  .review[data-pane=felder] .review-doc, .review[data-pane=original] .review-side { display: none; }
  .review[data-pane=original] .review-bar { top: 104px; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .who .name { display: none; }
  .page { padding: 24px 16px 80px; }
  h1 { font-size: 24px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 20px; }
  .login-art h1 { font-size: 28px; }
  .login-steps { display: none; }
  .setup-row { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .how div { border-left: 0; padding: 0; }
  .frow-main { grid-template-columns: minmax(0, 1fr); }
  .corr { grid-template-columns: minmax(0, 1fr); }
  .drop.compact { grid-template-columns: auto minmax(0, 1fr); }
  .drop.compact .btn { grid-column: 1 / -1; }
  .score .big { font-size: 30px; }
  .table th, .table td { padding: 10px 12px; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* Fragen an die Dokumente */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ask { max-width: 820px; }
.ask-log { display: grid; gap: 12px; margin: 16px 0; }
.ask-q, .ask-a { border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ask-q { background: var(--blue-50); justify-self: end; max-width: 85%; }
.ask-a { background: var(--surface); border: 1px solid var(--line); }
.ask-q b, .ask-a b { display: block; font-size: 16px; color: var(--muted); margin-bottom: 4px; }
.ask-q p, .ask-a p { margin: 0 0 6px; overflow-wrap: anywhere; }
.ask-src { font-size: 16px; margin: 6px 0; overflow-wrap: anywhere; }
.ask-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
@media (max-width: 560px) { .ask-form { flex-direction: column; align-items: stretch; } .ask-q { max-width: 100%; } }
.flag.ok { color: var(--green); }
.vfield-top .btn.confirm { padding: 3px 12px; min-height: 0; font-size: 16px; margin-left: 6px; }

/* Navigation, Organisation, Konto */
.mainnav { display: flex; gap: 4px; margin-left: 22px; }
.mainnav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 16px; }
.mainnav a:hover { color: var(--ink); background: var(--bg, var(--sunken)); }
.mainnav a[aria-current="page"] { color: var(--ink); background: var(--blue-50); }
@media (max-width: 720px) { .mainnav { margin-left: 8px; } .mainnav a { padding: 6px 8px; font-size: 16px; } .topbar .ver { display: none; } }
.hidden { display: none !important; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.roles { margin: 0; padding-left: 18px; color: var(--text); }
.roles li { margin: 4px 0; }
.copyline { display: flex; gap: 8px; align-items: center; margin: 8px 0 4px; min-width: 0; }
.copyline code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.orglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.orglist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.orglist li div { display: grid; }
.show-sm { display: none; }
@media (max-width: 560px) { .show-sm { display: block; } }
.notice.ok { background: var(--safe-bg); border-color: var(--safe-line); }

/* Farbrahmen im Original: blau = gelesen, gelb = offen, grün = geprüft */
.mark.warn { background: var(--marker-wash-soft); box-shadow: 0 0 0 1.5px var(--unsure); }
.mark.ok { background: var(--safe-wash); box-shadow: 0 0 0 1.5px var(--safe-wash); }
.mark.on { background: var(--marker-wash); box-shadow: 0 0 0 2px var(--unsure), 0 0 0 6px var(--marker-wash-soft); }
.only-open { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0 4px; font-size: 16px; }
.only-open label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .mainnav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; }
  .mainnav a { white-space: nowrap; }
}

/* Prüfregeln */
.rules { display: grid; gap: 8px; margin-top: 8px; }
.rule-row { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.rule-row.lv-fehler { border-left-color: var(--error); } .rule-row.lv-warnung { border-left-color: var(--unsure); }
.rule-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rule-top b { font-size: 16px; }
.rule-top select { width: auto; min-width: 0; }
.rule-body { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.rule-body select { width: auto; max-width: 100%; min-width: 0; }
.rule-body .op { color: var(--muted); font-weight: 700; }
.mini { display: inline-flex; gap: 6px; align-items: center; font-size: 16px; color: var(--text); }
.mini input:not([type=checkbox]) { width: 90px; }
.rulebox { display: grid; gap: 6px; padding: 12px 0 4px; }
.rule-res { display: flex; gap: 8px; align-items: flex-start; border-radius: 8px; padding: 8px 10px; font-size: 16px; }
.rule-res svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.rule-res.lv-fehler { background: var(--error-bg); color: var(--error); }
.rule-res.lv-warnung { background: var(--amber-50); color: var(--check); }
.rule-res.lv-hinweis { background: var(--blue-50); color: var(--blue-700); }
.rule-res.ok { background: var(--safe-bg); color: var(--safe); }
.rule-res .mini { display: flex; margin-top: 4px; }

/* Probelauf */
.probe { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; background: var(--sunken); }
.probe-doc { margin-top: 14px; min-width: 0; }
.probe-doc .fname { overflow-wrap: anywhere; }
.probe-t { margin-top: 6px; font-size: 16px; }
.probe-t td, .probe-t th { padding: 6px 8px; overflow-wrap: break-word; hyphens: auto; }
.probe-t td:first-child { white-space: nowrap; }
.probe-diff { background: var(--check-bg); }

/* ===== FluxDoc 0.2 · Seitenleiste, Start, Prüfplatz, Betreiber ===== */
:root { --side-width: 244px; --bar: 64px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
#main:focus { outline: none; }
.btn { min-height: 44px; }
.btn.small { min-height: 44px; }
@media (hover: hover) and (pointer: fine) { .btn.small { min-height: 34px; } .btn { min-height: 40px; } }
.app-shell { display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.side .brand { padding: 4px 10px 22px; }
.navlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.navlist a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--text); font: 600 16px/1.2 var(--body); text-decoration: none; min-height: 44px; }
.navlist a svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.navlist a:hover { background: var(--sunken); color: var(--ink); }
.navlist a[aria-current=page] { background: var(--blue-50); color: var(--blue-600); }
.navlist a[aria-current=page] svg { color: var(--blue); }
.navlist .count { margin-left: auto; font: 700 14px/1 var(--body); background: var(--blue); color: var(--on-accent); border-radius: 999px; padding: 4px 8px; min-width: 24px; text-align: center; }
.navhead { margin: 22px 12px 6px; font: 650 15px/1.2 var(--body); color: var(--muted); }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 16px; color: var(--muted); }
.side-foot strong { color: var(--ink); display: block; font-size: 16px; }
.side-foot .org { overflow-wrap: anywhere; }
#main { min-width: 0; }
.bottom { display: none; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 76px; }
  .side { display: none; }
  .bottom { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--white-strong); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom a { position: relative; display: grid; justify-items: center; gap: 4px; padding: 9px 2px 8px; min-height: 60px; font: 600 16px/1.1 var(--body); color: var(--muted); text-decoration: none; }
  .bottom a svg { width: 22px; height: 22px; }
  .bottom a[aria-current=page] { color: var(--blue-600); }
  .bottom .count { position: absolute; top: 5px; left: calc(50% + 6px); font: 700 14px/1 var(--body); background: var(--blue); color: var(--on-accent); border-radius: 999px; padding: 3px 6px; }
  .mobilebrand { display: flex !important; }
}
.mobilebrand { display: none; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.page { padding-top: 32px; }
.page-head h1 { font-size: 32px; }

/* Start-spezifische P0-Schichten (hero/flow) wurden durch das P1-Zielbild ersetzt. */
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 860px) { .cols2 { grid-template-columns: minmax(0, 1fr); } }
.panel { padding: 20px 22px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { color: var(--ink); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini-list a:hover { color: var(--blue-600); text-decoration: underline; }
.mini-list .sub { display: block; font-weight: 500; font-size: 16px; color: var(--muted); }
.mini-list .r { flex: none; font-size: 16px; color: var(--muted); text-align: right; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 120px; margin-top: 8px; }
.bars .bar { display: grid; gap: 4px; align-items: end; justify-items: center; height: 100%; font-size: 16px; color: var(--muted); grid-template-rows: 1fr auto auto; }
.bars .col-a, .bars .col-b { width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .stack2 { display: flex; gap: 3px; align-items: flex-end; width: 100%; height: 100%; }
.bars .stack2 i { display: block; flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .a { background: var(--blue-100); } .bars .b { background: var(--blue); }
.bars b { color: var(--ink); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dropzone { border: 1.5px dashed var(--input-line); border-radius: var(--r-lg); background: var(--surface); padding: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; position: relative; }
.dropzone.over { border-color: var(--blue); background: var(--blue-50); }
.dropzone .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.dropzone .ico svg { width: 22px; height: 22px; }
.dropzone strong { display: block; font: 650 16px/1.3 var(--head); }
.dropzone select { width: auto; min-width: 200px; max-width: 100%; margin-top: 8px; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .btn { position: relative; pointer-events: none; }
.dropzone select { position: relative; z-index: 2; }
@media (max-width: 720px) { .dropzone { grid-template-columns: auto minmax(0, 1fr); } .dropzone .btn { grid-column: 1 / -1; } }
.fault { border-left: 4px solid var(--amber); }

/* Prüfen-Liste */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar select { width: auto; min-width: 180px; }
.tabs .count.warn { background: var(--amber); }
.opentag { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--body); padding: 5px 9px; border-radius: 999px; background: var(--amber-50); color: var(--amber); }
.opentag.zero { background: var(--green-50); color: var(--green); }
.reason-cell { font-size: 16px; color: var(--muted); max-width: 320px; }
.doc-cards { display: none; }
@media (max-width: 720px) { .doc-cards { display: grid; gap: 10px; } .doc-table { display: none; } }
.doc-card { display: grid; gap: 6px; padding: 14px 16px; text-decoration: none; color: inherit; min-height: 64px; }
.doc-card b { color: var(--ink); overflow-wrap: anywhere; }

/* Prüfplatz */
.review { height: calc(100vh - 56px); }
.review-bar { position: static; margin: -20px -28px 16px; }
.review-doc { padding-top: 0; }
.review-doc .review-bar { position: sticky; top: 0; margin: 0 -28px 16px; padding: 10px 28px; }
.topbar.slim { height: 56px; }
.rhead { padding: 16px 22px 12px; border-bottom: 1px solid var(--line); }
.rhead .row1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rhead .fname { font: 650 17px/1.3 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rnav { display: flex; align-items: center; gap: 6px; flex: none; font-size: 16px; color: var(--muted); }
.rnav .btn { width: 44px; padding: 0; }
.rstate { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.rstate b { font: 750 30px/1 var(--head); letter-spacing: -.03em; }
.rstate span { font-size: 16px; color: var(--muted); }
.rstate.done b { color: var(--green); }
.qcard { border: 1px solid var(--amber-line); background: var(--check-bg); border-radius: var(--r-lg); padding: 16px 16px 14px; margin: 14px 0 0; scroll-margin: 12px; }
.qcard.active { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent); background: var(--surface); }
.qcard.done { border-color: var(--line); background: var(--surface); padding: 12px 16px; }
.qtop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qtop h3 { font-size: 19px; }
.qtop .req { color: var(--red); margin-left: 3px; }
.qwhy { font-size: 16px; color: var(--muted); margin: 4px 0 12px; }
.qask { font-weight: 650; color: var(--ink); margin: 0 0 10px; font-size: 16px; }
.answers { display: grid; gap: 8px; }
.ans { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; min-height: 52px; padding: 10px 16px; border: 1.5px solid var(--input-line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 650 17px/1.25 var(--body); cursor: pointer; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; transition: border-color .14s var(--ease), background .14s var(--ease); }
.ans:hover { border-color: var(--blue); background: var(--blue-50); }
.ans .k { flex: none; font: 600 14px/1 var(--body); color: var(--muted); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; background: var(--surface); }
.ans .src2 { display: block; font: 500 14px/1.3 var(--body); color: var(--muted); }
.ans.value { border-color: var(--blue); }
.answers.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 8px; }
.answers.small .ans { min-height: 44px; font: 600 16px/1.2 var(--body); justify-content: center; text-align: center; padding: 8px 10px; }
@media (hover: none) { .ans .k, .kbdhint { display: none; } }
.qother { margin-top: 8px; display: grid; gap: 6px; }
.qdone { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qdone .v { font-weight: 650; overflow-wrap: anywhere; }
.qdone .lab { font-size: 16px; color: var(--muted); display: block; }
.qdone svg { width: 18px; height: 18px; color: var(--green); vertical-align: -3px; margin-right: 6px; }
.qerr { color: var(--red); font-size: 16px; margin-top: 8px; font-weight: 600; }
.allfields { margin: 18px 0 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.allfields > summary { cursor: pointer; padding: 12px 0; font: 650 16px/1.2 var(--head); min-height: 44px; display: flex; align-items: center; }
.allfields > summary .muted { font: 500 14px/1 var(--body); margin-left: 8px; }
.rfoot { padding: 12px 22px 14px; border-top: 1px solid var(--line); background: var(--sunken); display: grid; gap: 10px; }
.rfoot .lead { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rfoot .big { flex: 1; min-width: 180px; }
.defer { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--input-line); border-radius: 12px; background: var(--surface); }
.reasons { display: flex; gap: 6px; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 22px; background: var(--amber-50); border-bottom: 1px solid var(--amber-line); font-size: 16px; }
.kbdhint { font-size: 14px; color: var(--muted); }
@media (max-width: 980px) {
  .review { height: auto; }
  .review-doc .review-bar { position: static; margin: 0 0 12px; }
  .review-doc { padding: 12px 12px 24px; }
  .rfoot { position: sticky; bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .mobile-switch { top: 56px; }
  .rhead .fname { font-size: 16px; }
}

/* Toast mit Aktion */
.toast .toast-act { margin-left: auto; border: 1px solid var(--white-line); background: transparent; color: var(--on-accent); border-radius: 8px; padding: 6px 12px; font: 650 14px/1 var(--body); cursor: pointer; min-height: 36px; }
.toast .toast-act:hover { background: var(--white-soft); }

/* Hilfe */
.help { max-width: 860px; }
.help h2 { margin: 34px 0 12px; }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps4 li { counter-increment: s; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.steps4 li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-50); color: var(--blue-600); font: 700 16px/1 var(--head); margin-bottom: 10px; }
.steps4 b { display: block; margin-bottom: 4px; color: var(--ink); }
.steps4 span { font-size: 16px; color: var(--text); }
@media (max-width: 860px) { .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps4 { grid-template-columns: minmax(0, 1fr); } }
.terms { display: grid; gap: 10px; }
.terms div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.terms dt { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.terms dd { margin: 0; color: var(--text); font-size: 16px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 650; color: var(--ink); min-height: 48px; display: flex; align-items: center; }
.faq details p { padding: 0 16px 14px; }
.keys { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: center; }

/* Betreiber */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.kpi .n { font: 750 28px/1 var(--head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 16px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.kpi.bad .n { color: var(--red); } .kpi.warn .n { color: var(--amber); } .kpi.good .n { color: var(--green); }
.sect { margin-top: 30px; }
.sect > h2 { margin-bottom: 12px; }
.statusline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.statusline.ok { border-color: var(--safe-line); background: var(--green-50); }
.statusline.warn { border-color: var(--amber-line); background: var(--amber-50); }
.statusline.bad { border-color: var(--error-line); background: var(--red-50); }
.tag-locked { color: var(--red); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; font-size: 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.money { font-variant-numeric: tabular-nums; }

/* Passwort-Link, Menüseite */
.morelist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.morelist a, .morelist button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; min-height: 60px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: 650 16px/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: left; }
.morelist svg { width: 22px; height: 22px; color: var(--blue); }
.qtop .src { border: 0; background: none; padding: 6px 0; font: 600 16px/1.2 var(--body); color: var(--blue-600); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.qtop .src:hover { text-decoration: underline; }
.vfield .src { min-height: 44px; padding: 6px 0; }
.statusline svg { width: 22px; height: 22px; flex: none; }
.statusline.ok svg { color: var(--green); } .statusline.warn svg { color: var(--amber); } .statusline.bad svg { color: var(--red); }
.notice.ok .copyline { flex-wrap: wrap; }

@media (pointer: coarse) {
  .tabs button, .chip-btn, .filter button, .linkish, .example, .grip { min-height: 44px; }
  .filter button { padding: 10px 14px; }
  input[type=checkbox] { width: 22px; height: 22px; }
  .vfield-sub label, .mini { min-height: 44px; }
}

/* Tippflächen: mindestens 44 Pixel (Prüfbericht A02) */
.brand { min-height: 44px; }
.mini-list a { display: block; padding: 10px 0; min-height: 44px; }
.mobile-switch button { min-height: 44px; }
details.more > summary, .allfields > summary { display: flex; align-items: center; min-height: 44px; }
.crumb { min-height: 44px; }

@media (pointer: coarse) {
  .col-move .btn { width: 44px; min-height: 44px; }
  .col-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
}
.mini-list li { flex-wrap: wrap; }
.mini-list a { flex: 1 1 200px; }
.mini-list .r { flex: 0 1 auto; }
@media (max-width: 980px) {
  .review-bar { flex-wrap: wrap; row-gap: 4px; }
  .review-bar .row { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 4px; }
  .review-bar .btn.small { padding: 0 12px; min-width: 44px; }
}
.empty h1 { font-size: 26px; }

/* Handy: feste untere Leiste (60 Pixel) darf weder Meldungen noch die Fußleiste des Assistenten verdecken */
@media (max-width: 860px) {
  .toast-host { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sticky-foot { bottom: calc(60px + env(safe-area-inset-bottom)); }
}

.allgood { margin: 14px 0 4px; padding: 16px 18px; border: 1px solid var(--safe-line); background: var(--green-50); border-radius: var(--r-lg); }
.allgood p { margin: 4px 0 12px; font-size: 16px; }
.allgood .kv { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
.allgood .kv dd { font-variant-numeric: tabular-nums; }
/* Im Prüfplatz gibt es am Handy keine untere Leiste; Meldungen sollen die Fußleiste mit „Freigeben“ nicht verdecken. */
@media (max-width: 980px) { body:has(.review) .toast-host { bottom: 190px; } }

/* ---------- 0.3: Auswertung, Rückmeldung, Neuigkeiten, Sammel-PDF ---------- */
.statspage .kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 720px) { .statspage .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .statspage .kpi .n { font-size: 24px; } }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi .n .of { font-size: 18px; color: var(--muted); font-weight: 650; }
.kpi .why { position: relative; flex: none; }
.kpi .why > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; margin: -8px -10px 0 0; display: grid; place-items: center; }
.kpi .why > summary span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: 700 16px/1 var(--body); color: var(--muted); background: var(--surface); }
.kpi .why > summary::-webkit-details-marker { display: none; }
.kpi .why > summary:hover span, .kpi .why[open] > summary span { border-color: var(--blue); color: var(--blue-600); }
.kpi .why > summary:focus-visible { outline: none; }
.kpi .why > summary:focus-visible span { outline: 2px solid var(--blue); outline-offset: 2px; }
.kpi .why p { position: absolute; right: 0; top: 40px; z-index: 5; width: min(300px, 78vw); padding: 12px 14px; border-radius: var(--r); background: var(--ink); color: var(--on-accent); font-size: 16px; line-height: 1.45; box-shadow: var(--shadow-2, 0 8px 24px var(--shadow-alpha-mid)); }
.wide-bars { height: 160px; gap: 3px; }
.wide-bars .bar span { white-space: nowrap; font-size: 16px; }
.meter { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--sunken); margin-right: 8px; vertical-align: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.table td.share { white-space: nowrap; }
.dup-list { margin-top: 6px; font-size: 16px; line-height: 1.6; }
.dup-list a { font-weight: 650; }
.upl-opts { display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.split-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--text); cursor: pointer; min-height: 44px; padding-top: 10px; }
.split-opt input { margin-top: 2px; flex: none; }
.cam-only { display: none; position: relative; }
@media (pointer: coarse) { .cam-only { display: inline-flex; } }
.news { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border-radius: var(--r-lg); background: var(--blue-50); border: 1px solid var(--blue-100); font-size: 16px; }
.news .btn.quiet { min-width: 44px; padding: 0 10px; }
.news .btn.quiet svg { width: 16px; height: 16px; }
.fb-dialog { border: 0; border-radius: var(--r-lg); padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px var(--shadow-alpha-pop); color: var(--text); background: var(--surface); }
.fb-dialog::backdrop { background: var(--overlay); }
.fb-dialog h2 { font-size: 22px; }
.moods { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.moods legend { width: 100%; margin-bottom: 6px; }
.mood { position: relative; }
.mood input { position: absolute; opacity: 0; }
.mood span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--input-line); border-radius: 999px; font-weight: 600; cursor: pointer; }
.mood input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--blue-700); }
.mood input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.done-row { opacity: .6; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Handy: Reiter umbrechen statt verstecken; im Einrichten zuerst die Felder, dann das Beispiel */
@media (max-width: 720px) {
  .tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }
  .tabs button { padding: 12px 10px; }
}
@media (max-width: 980px) { .wizard > .preview { order: 2; } }

@media print {
  .side, .bottom, .mobilebrand, .no-print, .skip, .toast-host { display: none !important; }
  .app-shell { display: block !important; }
  body { background: var(--surface); }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; }
  .kpi .why { display: none; }
}
@media (max-width: 720px) { .kpi .why p { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; } }

/* ---------- 0.4: Prüf-Baukasten ---------- */
.formats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .formats.two { grid-template-columns: minmax(0, 1fr); } }
.design { margin-bottom: 18px; }
.design h3 { font-size: 16px; }
.hints { margin: 0 0 10px; padding-left: 20px; font-size: 16px; }
.hints li { margin: 3px 0; }
.probe-doc > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; }
.probe-doc .fname { min-width: 0; overflow-wrap: anywhere; }
.assist-box { border: 1px solid var(--blue-100); background: var(--blue-50); border-radius: var(--r-lg); padding: 14px 16px; }
.assist-box textarea { margin-top: 6px; background: var(--surface); }

.file-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.file-list .btn svg { width: 16px; height: 16px; }

/* 0.5 · Einrichten für jeden: Vorlagen, Ansehen und anpassen, erster Beleg */
.welcome { max-width: 680px; margin: 8px 0 26px; }
.welcome h1 { font-size: 32px; letter-spacing: -.03em; }
.welcome .sub { margin-top: 10px; font-size: 16px; color: var(--text); }
.vgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.vcard { position: relative; display: flex; align-items: flex-start; gap: 14px; min-height: 104px; padding: 18px 44px 18px 18px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.vcard:hover { border-color: var(--blue-100); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.vcard:active { transform: translateY(0); }
.vico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.vico svg { width: 24px; height: 24px; }
.vtext { display: grid; gap: 4px; min-width: 0; }
.vtext b { font: 700 16px/1.25 var(--head); letter-spacing: -.01em; }
.vtext span { font-size: 16px; color: var(--muted); line-height: 1.45; }
.vgo { position: absolute; right: 16px; top: 50%; translate: 0 -50%; color: var(--faint); transition: color .18s var(--ease), translate .18s var(--ease); }
.vgo svg { width: 18px; height: 18px; display: block; }
.vcard:hover .vgo { color: var(--blue); translate: 3px -50%; }
.vcard.own { border-style: dashed; box-shadow: none; background: transparent; }
.vcard.own .vico { background: var(--sunken); color: var(--text); }
.vsplit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 22px; align-items: start; }
.vpreview { position: sticky; top: 84px; display: block; }
.vpreview .h3, .first-doc h2 { font: 700 16px/1.3 var(--head); margin: 0 0 8px; }
.card fieldset.vfields { border: 0; padding: 0; margin: 0; min-width: 0; }
.tfield { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.tfield input { margin-top: 3px; width: 20px; height: 20px; }
.tfield.off .vf-main b { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.vf-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.vf-main b { font-size: 16px; }
.vf-main .small { flex-basis: 100%; }
.vrules { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 10px; }
.vrules li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--ink); }
.vrules li .chip { flex: none; margin-top: 1px; min-width: 86px; justify-content: center; }
.vrules li.off { color: var(--faint); }
.vflow { list-style: none; counter-reset: v; margin: 0; padding: 0; display: grid; gap: 12px; }
.vflow li { counter-increment: v; position: relative; padding-left: 40px; display: grid; gap: 2px; }
.vflow li::before { content: counter(v); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; font: 700 16px/1 var(--head); }
.vflow b { font-size: 16px; }
.vflow span { font-size: 16px; color: var(--muted); }
.vcost { margin-top: 20px; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--blue-50); color: var(--blue-700); }
.vcost svg { width: 20px; height: 20px; margin-top: 1px; }
.vcost div { display: grid; gap: 2px; }
.first-doc { display: flex; gap: 14px; align-items: flex-start; padding: 18px; margin-bottom: 14px; border-radius: var(--r-lg); background: var(--blue-50); border: 1px solid var(--blue-100); }
.first-doc .vico { background: var(--surface); }
.first-doc p { margin-top: 2px; }
@media (max-width: 980px) { .vsplit { grid-template-columns: minmax(0, 1fr); } .vpreview { position: static; } }
@media (max-width: 560px) { .welcome h1 { font-size: 26px; } .vcard { min-height: 0; padding: 14px 40px 14px 14px; } .vrules li .chip { min-width: 0; } }

.col-name, .tfield input, #v-name { scroll-margin: 96px 0 140px; }
@media (max-width: 720px) { .wizard textarea::placeholder { font-size: 16px; } }
.qerr.warn { color: var(--amber); font-weight: 500; }
.rstate.stop b { color: var(--amber); font-size: 22px; }
/* 0.7: Kurzinfo je Beleg in Listen, Aufklapper „Einen Wert ändern“ */
.brief b { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.brief span { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.table .fname.small { font-weight: 400; color: var(--muted); max-width: 420px; }
.doc-card .brief b, .doc-card .fname.small { max-width: 100%; }
.allfields > summary { list-style: none; }
.allfields > summary::-webkit-details-marker { display: none; }
.allfields > summary::after { content: ''; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.allfields[open] > summary::after { transform: rotate(-135deg); }
.allfields > summary .muted { margin-right: 8px; }
@media (max-width: 720px) { .hide-phone { display: none !important; } }
@media (max-width: 720px) {
  .table.members thead { display: none; }
  .table.members tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.members td { display: block; padding: 0; border: 0; }
  .table.members td:first-child { grid-column: 1 / -1; }
  .table.members select { width: 100%; }
}
@media (max-width: 720px) { .table.members td.hide-sm { display: none; } }
@media (max-width: 720px) { .table-wrap .table th { white-space: normal; } .table-wrap .table { font-size: 16px; } }

/* T30: Feedback-Knopf sitzt über der unteren Leiste (Handy); Rückmeldungen mit Bild in der Betreiberansicht. */
@media (max-width: 860px) { :root { --ffb-unten: calc(84px + env(safe-area-inset-bottom)); } }
.rm-liste { display: grid; gap: 12px; }
.rm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.rm-bild { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sunken); }
.rm-bild img { display: block; width: 100%; height: auto; }
.rm-leer { padding: 24px 12px; text-align: center; color: var(--muted); font-size: 16px; }
.rm .fb-text { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) { .rm { grid-template-columns: minmax(0, 1fr); } }
