/* Rechnungsstar – Stylesheet
   Ruhige, sachliche Gestaltung: eine Schrift (Inter), eine Akzentfarbe, feine Linien statt Schatten. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/vendor/inter/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/vendor/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #0e1726;
  --text-2: #334155;
  --muted: #5d6b7e;
  --border: #e3e7ed;
  --border-strong: #cfd6df;
  --brand: #1f4fd1;
  --brand-hover: #1a43b3;
  --brand-ink: #ffffff;
  --brand-soft: #eef3fe;
  --brand-line: #c9d7fb;
  --accent: #e9a21b;
  --ok: #0f7a47;
  --ok-soft: #e7f5ee;
  --warn: #8a5300;
  --warn-soft: #fdf3e1;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .05);
  --shadow: 0 1px 2px rgba(14, 23, 38, .04), 0 8px 24px -12px rgba(14, 23, 38, .12);
  --shadow-lg: 0 2px 4px rgba(14, 23, 38, .04), 0 24px 48px -20px rgba(14, 23, 38, .22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --head-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1018;
    --bg-alt: #0f1520;
    --surface: #121a26;
    --surface-2: #18212f;
    --text: #e8edf4;
    --text-2: #c3cdd9;
    --muted: #94a1b2;
    --border: #232e3d;
    --border-strong: #324055;
    --brand: #6b93f5;
    --brand-hover: #87a7f7;
    --brand-ink: #08101f;
    --brand-soft: #142039;
    --brand-line: #26386180;
    --accent: #f2b544;
    --ok: #4cc38a;
    --ok-soft: #10291c;
    --warn: #f0b45a;
    --warn-soft: #2e230f;
    --err: #f2867b;
    --err-soft: #331613;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02);
    --shadow-lg: 0 24px 48px -24px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.03em; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.025em; }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopf ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--head-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.06rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; flex: none; }
.logo:hover { color: var(--text); }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--text); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 17px; height: 17px; fill: var(--accent); }
.logo-mark:not(:has(svg)) { color: var(--bg); font-size: .9rem; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .94rem; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .nav-cta { margin-left: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { background: var(--brand-hover); color: var(--brand-ink); }
.pro-badge { font-size: .7rem !important; font-weight: 700 !important; letter-spacing: .06em; padding: 3px 8px !important; border-radius: 6px !important; background: var(--ok-soft) !important; color: var(--ok) !important; margin-left: 6px; }

@media (max-width: 860px) {
  .site-head .wrap { flex-wrap: wrap; gap: 0; padding-top: 8px; }
  .nav { order: 2; width: calc(100% + 40px); margin: 6px -20px 0; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .nav-cta { order: -1; margin: 0 6px 0 0; }
}

/* ---------- Fuß ---------- */
.site-foot { border-top: 1px solid var(--border); margin-top: 96px; padding: 48px 0 32px; color: var(--muted); font-size: .92rem; background: var(--bg-alt); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.foot-grid { display: grid !important; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px !important; align-items: start !important; }
.foot-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-brand p { margin: 12px 0 0; max-width: 300px; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .86rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Bausteine ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.2;
  border-radius: var(--radius-sm); padding: 11px 18px; min-height: 44px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--muted); color: var(--text); background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn-small { padding: 6px 12px; min-height: 34px; font-size: .86rem; }
.btn-large { padding: 14px 24px; min-height: 52px; font-size: 1rem; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { color: var(--err); background: var(--err-soft); border-color: transparent; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }

.notice { border-radius: var(--radius-sm); padding: 12px 14px 12px 16px; margin: 12px 0; border: 1px solid transparent; border-left-width: 3px; font-size: .95rem; }
.notice-ok { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.notice-warn { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn); }
.notice-err { background: var(--err-soft); color: var(--err); border-left-color: var(--err); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: inherit; font-weight: 600; }

/* Haken-Listen */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4fd1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b93f5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
}

/* ---------- Startseite ---------- */
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; gap: 56px; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 48px; } }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 1.15rem; line-height: 1.65; color: var(--text-2); max-width: 560px; margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--muted); font-size: .9rem; }
.trust > span { display: inline-flex; align-items: center; gap: 7px; }
.trust .ico { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.25; }

/* Produkt-Abbildung im Hero */
.mock { position: relative; }
.mock-paper {
  background: #fff; color: #1a2433; border: 1px solid #e3e7ed; border-radius: 10px; padding: 26px 26px 22px;
  box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.5; color-scheme: light;
}
.mock-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.mock-top .from { font-weight: 700; font-size: 13px; }
.mock-top .from small { display: block; font-weight: 400; color: #6b7686; font-size: 11px; }
.mock-format { align-self: flex-start; font-size: 10px; font-weight: 600; color: #0f7a47; background: #e7f5ee; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.mock h4 { font-size: 16px; margin: 0 0 10px; color: #0e1726; letter-spacing: -.01em; }
.mock-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; color: #6b7686; margin-bottom: 14px; }
.mock-meta b { color: #1a2433; font-weight: 500; }
.mock-lines { width: 100%; border-collapse: collapse; }
.mock-lines th { text-align: left; font-size: 10px; font-weight: 600; color: #6b7686; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #1a2433; padding: 6px 4px; }
.mock-lines td { border-bottom: 1px solid #edf0f3; padding: 7px 4px; }
.mock-lines .r { text-align: right; white-space: nowrap; }
.mock-total { display: flex; justify-content: flex-end; gap: 28px; margin-top: 10px; font-weight: 700; font-size: 13px; }
.mock-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid #edf0f3; color: #6b7686; font-size: 10.5px; display: grid; gap: 2px; justify-items: end; padding-bottom: 48px; }
.mock-check {
  position: absolute; left: -28px; bottom: -26px; width: min(270px, 72%);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  box-shadow: var(--shadow-lg); font-size: 13px;
}
.mock-check strong { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.mock-check strong .ico { color: var(--ok); width: 18px; height: 18px; stroke-width: 2.25; }
.mock-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--muted); }
.mock-check li { display: flex; align-items: center; gap: 7px; }
.mock-check li .ico { width: 14px; height: 14px; color: var(--ok); stroke-width: 2.5; }
@media (max-width: 960px) { .mock { margin: 0 12px 0 28px; } }
@media (max-width: 560px) { .mock { margin: 0; } .mock-foot { padding-bottom: 0; } .mock-check { position: static; width: auto; margin-top: 12px; } }

/* Standards-Leiste */
.standards { border-block: 1px solid var(--border); background: var(--bg-alt); padding: 18px 0; }
.standards .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 36px; color: var(--muted); font-size: .88rem; }
.standards b { color: var(--text-2); font-weight: 600; }

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
@media (max-width: 700px) { .section { padding: 64px 0; } }

/* Funktionen */
.feature { padding: 4px 0; }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature-icon .ico { width: 21px; height: 21px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; }

/* Schritte */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--brand); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

/* Zeitleiste */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline strong { color: var(--brand); font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline.card { padding: 8px 24px; }

/* Pro-Vorteile */
.pro-section { background: var(--bg-alt); border-block: 1px solid var(--border); }
.pro-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; background: var(--text); color: var(--bg); }
.pro-pill svg { width: 12px; height: 12px; fill: var(--accent); }
.pro-features { margin-top: 8px; gap: 0 !important; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pro-features.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .pro-features.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pro-features.grid-3 { grid-template-columns: 1fr; } }
.pro-feature { padding: 28px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; outline: 1px solid var(--border); }
.pro-feature h3 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin-bottom: 8px; }
.pro-feature h3 .ico { color: var(--brand); }
.pro-feature p { margin: 0; }

/* Preise */
.pricing { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; }
.plan h3 { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.plan .price { font-size: 2.6rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan > p.small { min-height: 1.5em; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 20px 0 0; margin: 0 0 24px; flex: 1; border-top: 1px solid var(--border); display: grid; gap: 10px; align-content: start; }
.plan ul li { position: relative; padding-left: 26px; font-size: .95rem; color: var(--text-2); }
.plan ul li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4fd1' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (prefers-color-scheme: dark) {
  .plan ul li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b93f5' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
}
.plan .btn { width: 100%; }
.plan-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); position: relative; }
.plan-tag { position: absolute; top: -12px; left: 28px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--brand); color: var(--brand-ink); border-radius: 6px; padding: 4px 10px; }
.price-note { margin-top: 20px; }

.compare-card { margin-top: 48px; padding: 8px 0 0; overflow: hidden; }
.compare-card h3 { padding: 20px 24px 8px; text-align: left !important; }
.compare { width: 100%; border-collapse: collapse; min-width: 480px; font-size: .95rem; }
.compare th, .compare td { padding: 13px 24px; border-bottom: 1px solid var(--border); text-align: center; }
.compare thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--bg-alt); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--text-2); }
.compare td:nth-child(2) { color: var(--muted); }
.compare td:last-child { color: var(--brand); font-weight: 600; }

/* FAQ */
details.faq { border-bottom: 1px solid var(--border); padding: 0; }
details.faq:first-of-type { border-top: 1px solid var(--border); }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; padding: 20px 36px 20px 0; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
details.faq[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details.faq summary:hover { color: var(--brand); }
details.faq p { margin: -4px 0 20px; color: var(--muted); max-width: 680px; }

/* Abschluss-Aufruf */
.cta-band { border-radius: 16px; background: var(--text); color: var(--bg); padding: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: var(--bg); margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .75; }
.cta-band .btn-primary { background: var(--bg); border-color: var(--bg); color: var(--text); }
.cta-band .btn-primary:hover { opacity: .9; }
@media (max-width: 600px) { .cta-band { padding: 32px 24px; } }

/* ---------- Seitenkopf für Unterseiten ---------- */
.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 10px; }
.page-head p { color: var(--muted); font-size: 1.05rem; max-width: 720px; margin: 0; }

/* ---------- Viewer ---------- */
.dropzone {
  display: block; margin-top: 8px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface);
  padding: 56px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone strong { display: block; font-size: 1.1rem; margin-bottom: 4px; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; align-items: center; }
.toolbar .spacer { flex: 1; }
pre.xml { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow: auto; max-height: 480px; font: 12px/1.5 var(--mono); white-space: pre; }
.attachments { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* ---------- Rechnung (Papier – immer hell) ---------- */
.invoice-paper {
  position: relative; background: #fff; color: #1a1a1a; border: 1px solid #e3e7ed; border-radius: 8px;
  padding: clamp(18px, 5vw, 56px); box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; overflow: hidden;
  color-scheme: light;
}
.invoice-paper .muted { color: #667085; }
.invoice-paper h2 { color: #0e1726; }
.inv-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.inv-format { font-size: 11px; color: #667085; border: 1px solid #d9dee6; border-radius: 6px; padding: 2px 8px; align-self: flex-start; }
.inv-address { margin-bottom: 28px; }
.inv-sender-line { font-size: 10px; color: #667085; text-decoration: underline; margin-bottom: 6px; }
.inv-meta h2 { font-size: 22px; margin-bottom: 10px; }
.inv-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 0 0 20px; }
.inv-meta dt { color: #667085; }
.inv-meta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.inv-notes { margin-bottom: 16px; }
.inv-lines, .inv-totals { width: 100%; border-collapse: collapse; }
.inv-lines th { text-align: left; font-size: 12px; color: #667085; font-weight: 600; border-bottom: 2px solid #1a1a1a; padding: 6px 6px; }
.inv-lines td { border-bottom: 1px solid #e4e7ec; padding: 8px 6px; vertical-align: top; }
.inv-lines .num, .inv-totals .num { text-align: right; white-space: nowrap; }
.item-name { font-weight: 600; }
.item-desc { color: #667085; font-size: 13px; }
.inv-totals { margin: 16px 0 20px auto; max-width: 420px; }
.inv-totals td { padding: 4px 6px; }
.inv-totals tr.grand td { font-weight: 700; font-size: 16px; border-top: 2px solid #1a1a1a; padding-top: 8px; }
.inv-exempt p { font-weight: 600; }
.inv-payment { margin-top: 12px; }
.inv-foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid #e4e7ec; font-size: 12px; color: #667085; }
.watermark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: clamp(28px, 7vw, 64px); font-weight: 800; color: rgba(31, 79, 209, .07); transform: rotate(-24deg); white-space: nowrap;
}
.table-scroll { overflow-x: auto; }

/* ---------- Ersteller ---------- */
.editor { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .editor-preview { position: sticky; top: calc(var(--head-h) + 16px); max-height: calc(100vh - var(--head-h) - 32px); overflow: auto; }
}
fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px 22px 22px; margin: 0 0 16px; min-width: 0; box-shadow: var(--shadow-sm); }
legend { float: left; width: 100%; padding: 0 0 14px; margin: 0 0 16px; border-bottom: 1px solid var(--border); font-weight: 650; font-size: 1rem; letter-spacing: -.01em; }
legend + * { clear: both; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fields .wide { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 500; color: var(--text-2); min-width: 0; }
label.f span.hint { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: -4px; }
input, select, textarea {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; min-height: 42px; width: 100%; min-width: 0;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 76px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.invalid { border-color: var(--err) !important; background: var(--err-soft) !important; }
.line-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 3fr) minmax(70px, .8fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(70px, .7fr) auto; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--border); }
.line-row .line-desc { grid-column: 1 / -1; }
.line-total { font-weight: 600; text-align: right; padding: 10px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .line-row { grid-template-columns: 1fr 1fr; }
  .line-row .line-name, .line-row .line-desc { grid-column: 1 / -1; }
}
.sum-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin-top: 14px; max-width: 360px; margin-left: auto; font-variant-numeric: tabular-nums; }
.sum-box .grand { font-weight: 700; font-size: 1.1rem; padding-top: 6px; border-top: 1px solid var(--border); }
.sticky-actions {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 14px 0; border-top: 1px solid var(--border);
}
.quota { font-size: .88rem; color: var(--muted); margin-left: 4px; }
.sample-bar { display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.sample-bar p { margin: 0; flex: 1 1 260px; }
.sample-bar.hidden { display: none; }
.backup-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0 0; }
.backup-box.warn { border-color: var(--warn); background: var(--warn-soft); }
.backup-box p { margin: 0 0 10px; }
.backup-box .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

dialog { border: 1px solid var(--border); border-radius: 16px; padding: 28px; max-width: min(500px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(8, 14, 26, .55); backdrop-filter: blur(2px); }
dialog h2 { font-size: 1.3rem; }
dialog ul { padding-left: 20px; color: var(--text-2); }

/* ---------- Konto ---------- */
.key-box { font-family: var(--mono); font-size: 1.15rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; letter-spacing: .05em; overflow-wrap: anywhere; user-select: all; }

/* ---------- Texte (Ratgeber, Rechtliches) ---------- */
.prose { max-width: 720px; font-size: 1.02rem; color: var(--text-2); }
.prose h1 { color: var(--text); }
.prose h2 { margin-top: 2em; font-size: 1.35rem; color: var(--text); }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { line-height: 1.75; }
.prose .lead { font-size: 1.15rem; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 8px 0 20px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--bg-alt); font-weight: 600; color: var(--text); }
.prose .card { margin: 24px 0; }
.placeholder { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 4px; }

/* ---------- Pro-Hinweise ---------- */
.pro-hint { border: 1px solid var(--brand-line); background: var(--brand-soft); border-radius: var(--radius); padding: 18px 20px; margin: 12px 0; }
.pro-hint ul { margin: 8px 0 14px; padding-left: 20px; color: var(--text-2); }
.pro-hint strong { color: var(--text); }

/* ---------- Archiv ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 16px 0 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.warn strong { color: var(--err); }
.archive-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .94rem; }
.archive-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.archive-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
.archive-table tbody tr:last-child td { border-bottom: 0; }
.archive-table tbody tr:hover td { background: var(--bg-alt); }
.archive-table .num { text-align: right; white-space: nowrap; }
.archive-table .mono { white-space: nowrap; }
.archive-table .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.status { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.status-open { background: var(--warn-soft); color: var(--warn); }
.status-paid { background: var(--ok-soft); color: var(--ok); }
.status-overdue { background: var(--err-soft); color: var(--err); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.filters .btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filters input { flex: 1; min-width: 200px; }

/* ---------- Druck: nur die Rechnung ---------- */
@media print {
  body { background: #fff; }
  .site-head, .site-foot, .no-print, .toolbar, .editor-form, .sticky-actions, .dropzone, .notice, .page-head { display: none !important; }
  .editor { display: block; }
  .editor-preview { position: static; max-height: none; overflow: visible; }
  .invoice-paper { border: none; box-shadow: none; padding: 0; }
  .wrap { max-width: none; padding: 0; }
}
