/* Rechnungsreif — CI „Schreibtisch“: warm, menschlich, dokumentenhaft.
   Petrol auf warmem Papier, Zilla Slab für Überschriften, Karla für Text. */
/* Schriften lokal (SIL Open Font License), kein Abruf bei Google: Datenschutz und ein Roundtrip weniger. */
@font-face { font-family: "Karla"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/karla-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/zillaslab-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/zillaslab-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/zillaslab-700-latin.woff2") format("woff2"); }

:root {
  --bg: #F8F4EC;
  --surface: #FFFFFF;
  --ink: #2B2A26;
  --ink-soft: #5E5B52;
  --ink-faint: #8F8B80;
  --line: #E5DFD2;
  --accent: #156873;
  --accent-deep: #0E4F58;
  --accent-soft: #DDEDEF;
  --ok: #2E8B57;
  --warn: #9A6A1F;
  --warn-soft: #F6EBD6;
  --error: #9C3B2E;
  --error-soft: #F6E4DF;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.62 Karla, -apple-system, "Segoe UI", system-ui, sans-serif;
}
.shell { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 5rem; }
header.top {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 1.4rem 0 1.1rem; margin-bottom: 2rem;
}
.brand { font-family: "Zilla Slab", Georgia, serif; font-weight: 700; font-size: 1.45rem; text-decoration: none; color: var(--accent-deep); }
.brand b { color: var(--accent-deep); font-weight: 700; }
header.top nav { margin-left: auto; display: flex; gap: 1.5rem; flex-wrap: wrap; }
header.top nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
header.top nav a:hover, header.top nav a[aria-current] { color: var(--accent); }

h1 { font-family: "Zilla Slab", Georgia, serif; font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 0.6rem; }
h1 em, .mark { font-style: normal; color: var(--accent); border-bottom: 4px solid var(--accent-soft); }
.sub { color: var(--ink-soft); max-width: 44rem; margin: 0 0 2rem; font-size: 1.05rem; }
h2 { font-family: "Zilla Slab", Georgia, serif; font-weight: 700; font-size: 1.35rem; margin: 0 0 0.8rem; }
h3 { font-family: "Zilla Slab", Georgia, serif; font-weight: 600; font-size: 1.1rem; margin: 1.6rem 0 0.5rem; }

.hidden { display: none !important; }

/* Upload */
.dropzone {
  border: 2px dashed var(--accent); background: var(--surface); border-radius: 12px;
  padding: 3rem 2rem; text-align: center; cursor: pointer; transition: background 0.15s, box-shadow 0.15s;
}
.dropzone.drag, .dropzone:hover { background: var(--accent-soft); box-shadow: 0 14px 30px -18px rgba(21, 104, 115, 0.45); }
.dropzone p { margin: 0.3rem 0; color: var(--ink-soft); }
.dropzone .big { font-family: "Zilla Slab", serif; font-size: 1.25rem; color: var(--ink); font-weight: 600; }
.format-row { display: flex; gap: 1rem; margin: 1.2rem 0 0; flex-wrap: wrap; }
.format-row label {
  flex: 1; min-width: 16rem; display: block; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 0.9rem 1.1rem; cursor: pointer;
}
.format-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format-row input { margin-right: 0.5rem; accent-color: var(--accent); }
.format-row .d { display: block; color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.2rem; }
/* Zwei Wege nebeneinander: Upload (online) und die Desktop-App (lokal) */
.wege { max-width: 60rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 38rem) minmax(15rem, 19rem); gap: 1.4rem; justify-content: center; align-items: start; }
.wege .upload-box { max-width: none; margin: 0; }
.weg-desktop {
  position: relative; border: 1.5px solid var(--accent); border-radius: 14px; background: var(--surface);
  padding: 1.6rem 1.4rem 1.3rem; box-shadow: 0 16px 34px -24px rgba(14, 79, 88, 0.5);
}
.weg-desktop .neu {
  position: absolute; top: -0.75rem; left: 1.2rem; background: var(--accent-deep); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.weg-desktop .pc { color: var(--accent); margin-bottom: 0.6rem; }
.weg-desktop h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.weg-desktop p { margin: 0 0 0.7rem; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.45; }
.weg-desktop ul { list-style: none; padding: 0; margin: 0 0 1rem; color: var(--ink-soft); font-size: 0.88rem; }
.weg-desktop li { padding-left: 1.2rem; position: relative; margin: 0.25rem 0; }
.weg-desktop li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.weg-desktop .btn { display: block; text-align: center; text-decoration: none; padding: 0.65rem 1rem; font-size: 0.95rem; }
.weg-desktop small { display: block; margin-top: 0.6rem; color: var(--ink-faint); font-size: 0.78rem; text-align: center; }
@media (max-width: 900px) { .wege { grid-template-columns: minmax(0, 1fr); max-width: 38rem; } .weg-desktop { margin-top: 0.6rem; } }
html.desktop .weg-desktop { display: none; }
.trust { display: flex; gap: 1.4rem 1.8rem; flex-wrap: wrap; margin-top: 1.4rem; color: var(--ink-faint); font-size: 0.86rem; }

/* Status / Spinner */
.status-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2.5rem; text-align: center; }
.spinner {
  width: 2.2rem; height: 2.2rem; margin: 0 auto 1rem; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Review-Layout */
.review { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 1.5rem; align-items: start; }
/* minmax(0, …): sonst zieht die Mindestbreite der Positionstabelle die ganze Spalte breiter als das Handy-Display */
@media (max-width: 900px) { .review { grid-template-columns: minmax(0, 1fr); } }
.pdf-pane { position: sticky; top: 1rem; }
.pdf-pane embed { width: 100%; height: 82vh; border: 1px solid var(--line); border-radius: 12px; background: #4B4A46; }

.banner { border-radius: 10px; padding: 0.8rem 1.1rem; margin-bottom: 1rem; font-size: 0.95rem; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.error { background: var(--error-soft); color: var(--error); }
.banner.ok { background: var(--accent-soft); color: var(--accent-deep); }

fieldset {
  min-width: 0; /* Browser-Standard ist min-content: die Positionstabelle würde sonst die Spalte sprengen */
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 1rem 1.2rem 1.2rem; margin: 0 0 1rem;
}
legend { font-family: "Zilla Slab", serif; font-weight: 600; font-size: 1rem; padding: 0 0.4rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.7rem 1rem; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.f > span { font-size: 0.78rem; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.02em; }
.f input, .f select {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 0.5rem 0.65rem;
  font: inherit; font-size: 0.95rem; background: var(--surface); color: var(--ink); width: 100%;
}
.f input:focus, .f select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.f.missing input, .f.missing select { border-color: var(--warn); background: var(--warn-soft); }
.f.missing > span::after { content: " · fehlt"; color: var(--warn); }
.hint { font-size: 0.82rem; color: var(--ink-faint); margin: 0.4rem 0 0; }

/* Positionen */
table.lines { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.lines th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); padding: 0.3rem 0.35rem; }
table.lines td { padding: 0.2rem 0.25rem; }
table.lines input, table.lines select { width: 100%; border: 1.5px solid var(--line); border-radius: 7px; padding: 0.35rem 0.45rem; font: inherit; font-size: 0.88rem; }
table.lines td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.row-del { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 1rem; padding: 0.2rem; }
.row-del:hover { color: var(--error); }
.add-line { background: none; border: 1.5px dashed var(--line); border-radius: 8px; padding: 0.4rem 0.9rem; cursor: pointer; color: var(--ink-soft); font: inherit; font-size: 0.88rem; margin-top: 0.5rem; }
.add-line:hover { border-color: var(--accent); color: var(--accent); }

.totals { display: flex; gap: 2rem; justify-content: flex-end; font-variant-numeric: tabular-nums; margin-top: 0.8rem; flex-wrap: wrap; }
.totals div { text-align: right; }
.totals span { display: block; font-size: 0.75rem; color: var(--ink-faint); }
.totals b { font-size: 1.05rem; font-family: "Zilla Slab", serif; }

.actions { display: flex; gap: 0.8rem; align-items: center; margin-top: 1.2rem; flex-wrap: wrap; }
button.primary, .btn {
  background: var(--accent); color: #fff; border: none; border-radius: 9px;
  padding: 0.75rem 1.6rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
button.primary:hover, .btn:hover { background: var(--accent-deep); }
button.primary:disabled { background: var(--ink-faint); cursor: wait; }
button.ghost { background: var(--accent-soft); border: none; border-radius: 9px; padding: 0.75rem 1.3rem; font: inherit; font-weight: 700; cursor: pointer; color: var(--accent-deep); }
button.ghost:hover { background: #CBE2E6; }

/* Ergebnis / Prüfbericht */
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; }
.dl { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; border-radius: 9px; padding: 0.8rem 1.6rem; font-weight: 700; }
.dl:hover { background: var(--accent-deep); }
.report { margin-top: 1.2rem; }
.msg { border-left: 3px solid var(--line); padding: 0.4rem 0.9rem; margin: 0.4rem 0; font-size: 0.9rem; background: var(--surface); border-radius: 0 8px 8px 0; }
.msg.Error { border-color: var(--error); }
.msg.Warning { border-color: var(--warn); }
.msg .rule { font-family: ui-monospace, monospace; font-size: 0.76rem; color: var(--ink-faint); }
.msg .expl { color: var(--accent-deep); font-size: 0.85rem; display: block; margin-top: 0.15rem; }
.duty { background: var(--warn-soft); border-radius: 12px; padding: 0.9rem 1.2rem; margin-top: 1.2rem; font-size: 0.92rem; }

/* Rückmeldung nach dem Ergebnis */
.feedback { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 2rem 1.6rem; margin-top: 1.2rem; max-width: 44rem; }
.feedback h2 { margin-bottom: 0.3rem; }
.feedback p { color: var(--ink-soft); margin: 0 0 1rem; font-size: 0.95rem; }
.feedback p.banner { margin: 0; }
.feedback-choice { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.feedback textarea {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 0.6rem 0.75rem; width: 100%;
  font: inherit; font-size: 0.95rem; background: var(--surface); color: var(--ink); resize: vertical; min-height: 5.5rem;
}
.feedback textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.feedback .hint { margin-bottom: 0.2rem; }

footer { margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 0.82rem; }
footer .legal { margin-top: 0.4rem; }
footer .legal a { color: var(--ink-soft); text-decoration: none; margin-right: 1.2rem; }
footer .legal a:hover { color: var(--accent); }

/* ---------- Landing: Schreibtisch-Motive ---------- */
.hero-s { text-align: center; padding-top: 1rem; }
.hero-s h1 { font-size: clamp(2rem, 4.8vw, 3.2rem); max-width: 46rem; margin: 0 auto 0.6rem; }
.hero-s .sub { margin: 0.8rem auto 0; }

.tisch { display: flex; align-items: center; justify-content: center; gap: 1.6rem; padding: 2.6rem 0 1.8rem; flex-wrap: wrap; }
.dok { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; width: 15rem; padding: 1.2rem 1.2rem 1.4rem; box-shadow: 0 16px 36px -20px rgba(43, 42, 38, 0.3); text-align: left; }
.dok .name { font-size: 0.72rem; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.9rem; display: flex; justify-content: space-between; gap: 0.6rem; }
.dok .zeile { height: 0.55rem; background: #EEEAE0; border-radius: 2px; margin-bottom: 0.5rem; }
.dok .zeile.kurz { width: 55%; }
.dok .zeile.titel { width: 70%; background: #DDD6C6; height: 0.8rem; margin-bottom: 0.9rem; }
.dok.alt { transform: rotate(-2deg); }
.dok.neu { transform: rotate(1.5deg); border: 1.5px solid var(--accent); position: relative; }
.dok.neu .zeile { background: var(--accent-soft); }
.dok.neu .zeile.titel { background: #BFDDE1; }
.dok.neu .xml { font-family: ui-monospace, monospace; font-size: 0.66rem; color: var(--accent-deep); background: var(--accent-soft); border-radius: 4px; padding: 0.3rem 0.5rem; margin-top: 0.8rem; }
.dok.neu .haken { position: absolute; top: -0.9rem; right: -0.9rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: 0 6px 14px -4px rgba(46, 139, 87, 0.5); }
.pfeil { text-align: center; }
.pfeil .p { font-size: 2rem; color: var(--accent); line-height: 1; }
.pfeil small { display: block; color: var(--ink-faint); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.2rem; }
.upload-box { max-width: 38rem; margin: 0 auto; }

section.land { padding: 3.6rem 0 0; }
section.land .lead { color: var(--ink-soft); max-width: 42rem; }
.briefe { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem; margin-top: 1.8rem; }
.brief { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem; }
.brief .wer { font-family: "Zilla Slab", serif; font-weight: 600; font-size: 1.02rem; margin-bottom: 0.4rem; }
.brief .wer::before { content: "„"; color: var(--accent); font-size: 1.3rem; }
.brief p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.brief .antwort { margin-top: 0.9rem; font-size: 0.9rem; color: var(--accent-deep); font-weight: 700; }
.brief .antwort::before { content: "→ "; }

.schrittband { display: flex; gap: 0; margin-top: 1.8rem; flex-wrap: wrap; }
.schrittband div { flex: 1; min-width: 14rem; padding: 1.2rem 1.6rem 1.2rem 1.4rem; border-left: 3px solid var(--accent-soft); }
.schrittband div:first-child { border-left-color: var(--accent); }
.schrittband b { font-family: "Zilla Slab", serif; font-size: 1.08rem; display: block; margin-bottom: 0.25rem; }
.schrittband span { color: var(--ink-soft); font-size: 0.94rem; }

.mehr-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.2rem; margin-top: 1.8rem; }
.mehr-karte { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.7rem 1.8rem 1.8rem; display: flex; flex-direction: column; }
.mehr-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem; }
.mehr-karte h3 { margin: 0 0 0.5rem; font-size: 1.18rem; font-weight: 700; line-height: 1.3; color: var(--accent-deep); }
.mehr-karte p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.mehr-cta { margin-top: auto; padding-top: 1.4rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mehr-cta .btn { padding: 0.65rem 1.3rem; font-size: 0.95rem; }
.mehr-cta .gratis { font-size: 0.82rem; color: var(--ink-faint); }

.faq { margin-top: 1.4rem; max-width: 46rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.9rem 1.2rem; list-style: none; }
.faq summary::before { content: "+ "; color: var(--accent); }
.faq details[open] summary::before { content: "– "; }
.faq details p { padding: 0 1.2rem 1rem; margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.preis-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.preis-teaser .pt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; display: flex; flex-direction: column; }
.preis-teaser .pt.haupt { border: 2px solid var(--accent); }
.preis-teaser .p { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.8rem; margin: 0.2rem 0; }
.preis-teaser small { color: var(--ink-faint); display: block; }
.preis-teaser .pt-cta { margin-top: 1rem; text-align: center; font-size: 0.92rem; padding: 0.65rem 1rem; }
.preis-teaser .ghostlink { background: var(--accent-soft); color: var(--accent-deep); }
.preis-teaser .ghostlink:hover { background: #CBE2E6; }

/* Konto-Seite */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.plan { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); padding: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.plan.featured { border-color: var(--accent); }
.plan .price { font-family: "Zilla Slab", serif; font-size: 1.5rem; font-weight: 700; }
.plan .per { color: var(--ink-faint); font-size: 0.85rem; }
.plan button { margin-top: auto; }
.stat { display: flex; gap: 2.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.stat div span { display: block; font-size: 0.78rem; color: var(--ink-faint); }
.stat div b { font-size: 1.2rem; font-family: "Zilla Slab", serif; }

/* Wissensdatenbank + Rechtstexte */
article.wissen { max-width: 44rem; }
article.wissen h1 { margin-bottom: 1rem; }
article.wissen h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
article.wissen table { border-collapse: collapse; width: 100%; margin: 1rem 0; background: var(--surface); font-size: 0.95rem; }
article.wissen th, article.wissen td { border: 1px solid var(--line); padding: 0.55rem 0.8rem; text-align: left; }
article.wissen th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); }
article.wissen .cta { background: var(--accent-soft); border-radius: 12px; padding: 1rem 1.3rem; margin: 1.6rem 0; }
article.wissen .cta a { color: var(--accent-deep); font-weight: 700; }
article.wissen a { color: var(--accent-deep); }
.wissen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.wissen-grid a { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 1.1rem 1.3rem; text-decoration: none; color: var(--ink); }
.wissen-grid a:hover { border-color: var(--accent); }
.wissen-grid a strong { display: block; margin-bottom: 0.3rem; font-family: "Zilla Slab", serif; }
.wissen-grid a span { color: var(--ink-faint); font-size: 0.88rem; }
.meta-row { color: var(--ink-faint); font-size: 0.82rem; margin-bottom: 1.5rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Landingpages: Upload direkt unter der Einleitung, Illustration darunter */
.hero-s + .upload-box, .hero-s + .wege { margin-top: 1.8rem; }

/* ---------- Review: breite Seite, ruhige Pflichtfeld-Markierung ---------- */
body.in-review .shell { max-width: 120rem; }
.review-head { max-width: 60rem; }
.review-quick {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1.2rem; padding: 0.8rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.review-quick.ready { background: var(--accent-soft); }
.review-quick .quick-ready, .review-quick .quick-todo, .review-quick .quick-warned { display: none; align-items: center; gap: 1rem; flex-wrap: wrap; flex: 1 1 24rem; }
.review-quick .quick-todo { display: flex; }
.review-quick.ready .quick-ready { display: flex; }
.review-quick.warned .quick-warned { display: flex; }
.review-quick.ready .quick-todo, .review-quick.warned .quick-todo { display: none; }
.review-quick.ready #cancel-top { background: var(--surface); }
.review-quick span { font-size: 0.9rem; color: var(--ink-soft); max-width: 44rem; line-height: 1.45; }
.review-quick.ready span { color: var(--accent-deep); }
.review-quick #cancel-top { margin-left: auto; }
.review-head .sub { margin-bottom: 1.2rem; }
.pill-demo, .f.missing > span::after {
  display: inline-block; background: var(--warn); color: #fff; border-radius: 999px;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.12rem 0.5rem; line-height: 1.3; vertical-align: middle;
}
.pill-demo { margin: 0 0.1rem; }
.f { position: relative; }
.f.missing > span { padding-right: 3.4rem; }
.f.missing > span::after { content: "fehlt"; position: absolute; right: 0; top: -0.05rem; }
.review { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); gap: 2rem; }
@media (max-width: 1100px) { .review { grid-template-columns: minmax(0, 1fr); } .pdf-pane { position: static; } .pdf-pane iframe { height: 60vh; min-height: 0; } }
.pdf-pane iframe { width: 100%; height: calc(100vh - 2rem); min-height: 36rem; border: 1px solid var(--line); border-radius: 12px; background: #4B4A46; display: block; }
table.lines { min-width: 48rem; }
table.lines th.pos, table.lines td.pos { width: 2.6rem; text-align: right; color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 0.82rem; padding-right: 0.5rem; }
table.lines th:nth-child(3), table.lines td:nth-child(3) { width: 5.5rem; }
table.lines th:nth-child(4), table.lines td:nth-child(4) { width: 7.5rem; }
table.lines th:nth-child(5), table.lines td:nth-child(5),
table.lines th:nth-child(6), table.lines td:nth-child(6) { width: 7.5rem; }
table.lines th:nth-child(7), table.lines td:nth-child(7) { width: 5rem; }
table.lines th:nth-child(8), table.lines td:nth-child(8) { width: 6.2rem; }
table.lines tr.warn td { background: var(--warn-soft); }
table.lines tr.warn td.pos { color: var(--warn); font-weight: 600; }
table.lines tr.warn input[data-k="lineTotalNet"] { border-color: var(--warn); }
table.lines.only-warn tbody tr:not(.warn) { display: none; }
.row-actions { display: flex; gap: 0.1rem; justify-content: flex-end; }
.row-actions button { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 0.95rem; padding: 0.15rem 0.25rem; border-radius: 6px; line-height: 1; }
.row-actions button:hover { background: var(--bg); color: var(--accent-deep); }
.row-actions .row-del:hover { color: var(--error); }
.lines-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin: 0.2rem 0 0.5rem; font-size: 0.9rem; color: var(--ink-soft); }
.lines-head #lines-summary.ok .tick { color: var(--accent); font-weight: 700; }
.lines-head #lines-summary.warn { color: var(--warn); }
.lines-filter { font-size: 0.85rem; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; gap: 0.4rem; }
table.lines td { padding: 0.25rem 0.3rem; }

/* ---------- Ergebnis: Erfolgsmoment ---------- */
.done-hero {
  background: var(--accent-deep); color: #EAF3F2; border-radius: 18px; padding: 2.6rem 2.4rem 2.4rem;
  display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.6rem; align-items: start;
}
.done-hero h1 { color: #fff; margin: 0; grid-column: 2; }
.done-hero .sub { color: #C6DADA; margin: 0.4rem 0 1.4rem; grid-column: 2; font-size: 1.08rem; max-width: 52rem; }
.done-check {
  grid-row: 1 / span 3; width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--ok); color: #fff;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; box-shadow: 0 10px 24px -8px rgba(46, 139, 87, 0.7);
}
.done-cta { grid-column: 2; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.done-cta .dl { background: #fff; color: var(--accent-deep); font-size: 1.05rem; padding: 0.9rem 1.8rem; }
.done-cta .dl:hover { background: var(--accent-soft); }
.done-file { color: #B9D2D2; font-size: 0.88rem; }
#view-done.rejected .done-hero { background: var(--error-soft); color: var(--error); }
#view-done.rejected .done-hero h1 { color: var(--error); }
#view-done.rejected .done-hero .sub { color: var(--ink-soft); }
#view-done.rejected .done-check { background: var(--error); }
#view-done.rejected .done-check::before { content: "!"; }
#view-done.rejected .done-check { font-size: 0; }
#view-done.rejected .done-check::before { font-size: 2.2rem; }
.done-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; margin-top: 1.2rem; }
@media (max-width: 760px) { .done-grid { grid-template-columns: 1fr; } .done-hero { grid-template-columns: 1fr; } .done-hero h1, .done-hero .sub, .done-cta { grid-column: 1; } .done-check { grid-row: auto; } }
.done-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.8rem; }
.done-card h2 { margin-bottom: 0.5rem; }
.done-card p { color: var(--ink-soft); margin: 0 0 0.8rem; font-size: 0.97rem; }
.done-card.duty { background: var(--warn-soft); border-color: transparent; margin-top: 0; }
.done-card.duty p { color: var(--ink); }
.done-card .ghost { margin-top: 0.4rem; }
.prove { margin-top: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.8rem; }
.prove .sub { margin-bottom: 1rem; }
.prove iframe { width: 100%; height: 70vh; min-height: 30rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#view-done .result-card { margin-top: 1.2rem; }
#view-done .result-card .report { margin-top: 0; }
#view-done .result-card .actions { margin-top: 1rem; }
.feedback { max-width: none; }

/* ---------- Stapel-Umwandlung ---------- */
.batch-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.batch-stats { font-family: "Zilla Slab", serif; font-weight: 600; font-size: 1.05rem; }
table.batch { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 0.8rem; font-size: 0.93rem; }
table.batch th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
table.batch td { padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.batch tr:last-child td { border-bottom: 0; }
table.batch td.name { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.batch td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.batch td:last-child { text-align: right; white-space: nowrap; }
.st { display: inline-block; border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.82rem; font-weight: 700; background: var(--line); color: var(--ink-soft); }
.st.wait { background: var(--accent-soft); color: var(--accent-deep); }
.st.warn { background: var(--warn-soft); color: var(--warn); }
.st.ready { background: #E3F1E8; color: var(--ok); }
.st.ok { background: var(--ok); color: #fff; }
.st.error { background: var(--error-soft); color: var(--error); }
button.small, .dl.small { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

/* Konto anlegen nach der Umwandlung */
.konto-card { margin-top: 1.2rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.4rem 2.4rem; align-items: start; background: var(--accent-soft); border-color: transparent; }
.konto-card h2 { margin-bottom: 0.4rem; }
.konto-card > div > p { color: var(--ink); }
.konto-features { margin: 0.7rem 0 0; padding-left: 1.1rem; color: var(--ink); font-size: 0.95rem; }
.konto-features li { margin-bottom: 0.45rem; }
.konto-form { display: flex; flex-direction: column; gap: 0.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; }
.konto-form .actions { margin-top: 0; }
.konto-form .hint { margin: 0; }
.konto-optin { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.86rem; color: var(--ink-soft); cursor: pointer; }
.konto-optin input { margin: 0.2rem 0 0; flex: none; accent-color: var(--accent); }
.konto-card .banner { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .konto-card { grid-template-columns: 1fr; } }
body.addin #konto-card { display: none; }

/* Rückmeldung als Leiste unter dem Ergebnis */
.feedback.bar { margin-top: 1.2rem; padding: 1.1rem 1.6rem; }
.feedback.bar .feedback-ask { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.feedback.bar h2 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.feedback.bar .feedback-ask p { margin: 0; font-size: 0.92rem; }
.feedback.bar form { margin-top: 0.4rem; }
body.addin .feedback.bar { padding: 1rem 1.1rem; }

/* Startseite: Stapel-Band */
/* Konto: Werkzeug-Karte */
.tool-card { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; background: var(--accent-soft); border-radius: 14px; padding: 1.4rem 1.8rem; margin-bottom: 2rem; }
@media (max-width: 640px) { .tool-card { grid-template-columns: 1fr; } }
.tool-card h2 { margin-bottom: 0.3rem; color: var(--accent-deep); }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Wissensartikel: Kopf, Inhaltsverzeichnis, Lesefluss ---------- */
.wissen-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; column-gap: 4rem; row-gap: 0; align-items: start; }
.wissen-head { grid-column: 1 / -1; max-width: 52rem; margin-bottom: 2.4rem; padding-bottom: 1.8rem; border-bottom: 1px solid var(--line); }
.wissen-head .eyebrow { margin: 0 0 0.9rem; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); display: flex; gap: 0.6rem; align-items: center; }
.wissen-head .eyebrow a { color: var(--accent); text-decoration: none; font-weight: 700; }
.wissen-head .eyebrow a:hover { text-decoration: underline; }
.wissen-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.55rem); line-height: 1.14; margin: 0 0 1.3rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.6rem; color: var(--ink-soft); font-size: 0.9rem; }
.article-meta .autor { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); }
.article-meta .autor b { display: block; font-weight: 700; line-height: 1.2; }
.article-meta .autor small { display: block; color: var(--ink-faint); font-size: 0.8rem; line-height: 1.3; }
.article-meta .initialen { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-family: "Zilla Slab", serif; font-weight: 700; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; }
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.article-meta .meta-item svg { color: var(--ink-faint); flex: none; }
.wissen-side { grid-column: 2; position: sticky; top: 1.5rem; font-size: 0.9rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 0.8rem; }
.toc-title { margin: 0 0 0.5rem; font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.38rem 0.6rem 0.38rem 0.75rem; margin-left: -0.75rem; border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; line-height: 1.35; border-radius: 0 6px 6px 0; }
.toc a:hover { color: var(--accent-deep); background: var(--bg); }
.toc a.active { color: var(--accent-deep); border-left-color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.side-note { margin: 1rem 0.2rem 0; color: var(--ink-faint); font-size: 0.8rem; line-height: 1.5; }
.wissen-body { grid-column: 1; grid-row: 2; max-width: 46rem; font-size: 1.05rem; line-height: 1.7; }
.wissen-body p, .wissen-body li { margin-top: 0; }
.wissen-body p { margin-bottom: 1.15rem; }
.wissen-body .lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink); }
.wissen-body h2 { font-size: 1.45rem; margin: 2.6rem 0 0.8rem; scroll-margin-top: 1.5rem; line-height: 1.25; }
.wissen-body h2:first-child { margin-top: 0; }
.wissen-body ol, .wissen-body ul { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.wissen-body li { margin-bottom: 0.45rem; }
.wissen-body table { font-size: 0.93rem; margin: 1.2rem 0 1.5rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; }
.wissen-body th, .wissen-body td { border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.wissen-body td + td, .wissen-body th + th { border-left: 1px solid var(--line); }
.wissen-body tr:last-child td { border-bottom: 0; }
.wissen-body th { background: var(--bg); }
.wissen-body pre { background: #26302F; color: #E6EFEE; border-radius: 10px; padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.84rem; line-height: 1.5; margin: 1rem 0 1.4rem; }
.wissen-body code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }
.wissen-body :not(pre) > code { background: var(--accent-soft); color: var(--accent-deep); padding: 0.05em 0.35em; border-radius: 4px; }
.wissen-body blockquote { margin: 1rem 0 1.2rem; padding: 0.2rem 0 0.2rem 1.1rem; border-left: 3px solid var(--accent); color: var(--ink-soft); }
.wissen-body blockquote p { margin: 0; }
.wissen-body .cta { margin: 2.2rem 0; padding: 1.2rem 1.4rem; }
.wissen-body .faq { max-width: none; }
.wissen-body .meta-row { margin-top: 1rem; }
.lese-fortschritt { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 50; transition: width 0.1s linear; }
@media (max-width: 960px) {
  .wissen-layout { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .wissen-side { grid-column: 1; grid-row: 2; position: static; margin-bottom: 2rem; }
  .wissen-body { grid-row: 3; max-width: none; }
  .side-note { display: none; }
}
@media (max-width: 640px) {
  .wissen-body { font-size: 1rem; }
  .wissen-body .lead { font-size: 1.06rem; }
  .article-meta { gap: 0.6rem 1.1rem; }
}
.wissen-body .table-wrap { overflow-x: auto; margin: 1.2rem 0 1.5rem; -webkit-overflow-scrolling: touch; }
.wissen-body .table-wrap table { margin: 0; min-width: 100%; }

/* ---------- Wissen: Übersicht ---------- */
article.wissen.wissen-index { max-width: none; }
.wissen-index .wissen-head { max-width: none; margin-bottom: 2.2rem; }
.wissen-index .wissen-head .lead { max-width: 46rem; font-size: 1.12rem; line-height: 1.6; margin: 0 0 1.4rem; }
.tool-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tool-row .btn { font-size: 0.92rem; padding: 0.6rem 1rem; text-decoration: none; }
.tool-row .btn.ghost { background: var(--surface); color: var(--accent-deep); border: 1px solid var(--line); }
.tool-row .btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.wissen-index .rubrik { margin: 0 0 2.6rem; }
.wissen-index .rubrik h2 { font-size: 1.35rem; margin: 0 0 0.2rem; }
.wissen-index .rubrik-sub { color: var(--ink-faint); margin: 0 0 1rem; font-size: 0.95rem; }
.wissen-index .wissen-grid { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.wissen-card { display: flex; flex-direction: column; gap: 0.35rem; min-height: 11rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 1.15rem 1.3rem 1rem; text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.wissen-card:hover { border-color: var(--accent); box-shadow: 0 12px 26px -20px rgba(21, 104, 115, 0.5); transform: translateY(-1px); }
.wissen-card .card-rubrik { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.wissen-card strong { font-family: "Zilla Slab", serif; font-size: 1.12rem; line-height: 1.25; color: var(--ink); }
.wissen-card .card-text { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.wissen-card .card-meta { margin-top: auto; padding-top: 0.6rem; color: var(--ink-faint); font-size: 0.78rem; }
.code-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 1rem; }
.chips-label { color: var(--ink-faint); font-size: 0.82rem; margin-right: 0.3rem; }
.code-chip { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; padding: 0.3rem 0.6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--accent-deep); text-decoration: none; }
.code-chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.wissen-grid a.wissen-card { display: flex; padding: 1.15rem 1.3rem 1rem; }
.wissen-grid a.wissen-card span { font-size: inherit; color: inherit; }
.wissen-index .tool-row a.btn { color: #fff; }
.wissen-index .tool-row a.btn.ghost { color: var(--accent-deep); }
.wissen-grid a.wissen-card { color: var(--ink); }
.wissen-grid a.wissen-card .card-text { color: var(--ink-soft); font-size: 0.92rem; }
.wissen-grid a.wissen-card .card-meta { color: var(--ink-faint); font-size: 0.78rem; }
.code-chips:not(:has(a)) { display: none; }

/* Hinweis beim Verlassen des Reviews */
dialog.leave {
  box-sizing: border-box; border: 0; border-radius: 16px; padding: 1.6rem 1.8rem;
  width: min(34rem, calc(100vw - 2rem)); max-width: none;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
dialog.leave::backdrop { background: rgba(20, 20, 18, 0.45); }
dialog.leave h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
dialog.leave p { color: var(--ink-soft); margin: 0 0 1rem; font-size: 0.95rem; }
dialog.leave p.hint { margin: 0.4rem 0 0.8rem; }
dialog.leave .actions { margin-top: 0.4rem; }
.leave-reasons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.leave-reasons button {
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem;
  font: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer;
}
.leave-reasons button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
dialog.leave textarea {
  width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem;
  font: inherit; font-size: 0.95rem; resize: vertical; background: var(--bg);
}
dialog.leave textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
/* Einwand beim Erzeugen */
dialog.blocked h2 { color: var(--error); }
dialog.blocked #blocked-text { color: var(--ink); white-space: pre-line; }
dialog.blocked .report-hint { margin: 1rem 0 0; font-size: 0.9rem; }

/* Problem melden: Band auf der Startseite und Verweise im Review */
.bonus-only { display: none; }
body.bonus-active .bonus-only { display: inline; }
body.bonus-active .no-bonus { display: none; }
a.report-link { color: var(--accent-deep); font-size: 0.9rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
a.report-link:hover { border-bottom-color: var(--accent); }
.leave .report-hint { background: var(--accent-soft); border-radius: 10px; padding: 0.7rem 0.9rem; margin: 0 0 0.9rem; font-size: 0.9rem; color: var(--accent-deep); }
.review-quick .quick-report {
  flex-basis: 100%; margin-top: 0.3rem; padding-top: 0.75rem; border-top: 1px solid var(--line);
  font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; line-height: 1.5;
}
.review-quick .quick-report strong { color: var(--accent-deep); }
.review-quick .quick-report-cta { color: var(--accent-deep); font-weight: 700; white-space: nowrap; }
.review-quick .quick-report:hover .quick-report-cta { text-decoration: underline; }
.review-quick.ready .quick-report { border-top-color: rgba(0, 0, 0, 0.08); }
.feedback .report-hint { background: var(--accent-soft); border-radius: 12px; padding: 1rem 1.2rem; margin: 0 0 1rem; font-size: 0.95rem; color: var(--accent-deep); line-height: 1.5; }
.feedback .report-hint .btn { display: inline-block; margin-top: 0.7rem; }
.feedback .feedback-email { max-width: 26rem; margin-top: 0.6rem; }
