/* =====================================================================
   briefmio – Stylesheet
   Aufbau: 1 Grundwerte · 2 Basis · 3 Layout · 4 Kopf/Fuss · 5 Bausteine
   (Knoepfe, Felder, Karten, Hinweise) · 6 Startseite · 7 Inhaltsseiten ·
   8 Kuendigung · 9 Editor/Upload · 10 Vorschau, Status, Konto
   ===================================================================== */

/* ---------- 1 Grundwerte ---------- */
:root {
  --bg: #ffffff;          /* Seitengrund */
  --bg-soft: #f5f7fb;     /* Baender, Formularseiten */
  --card: #ffffff;
  --ink: #0b1324;         /* Text */
  --ink-2: #334155;       /* Fliesstext zweiter Ebene */
  --muted: #64748b;
  --line: #e4e8f0;
  --line-strong: #cfd7e6;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-deep: #1e3a8a;
  --brand-soft: #eef3ff;
  --brand-line: #d4e0fd;
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.18);
  --ok: #10b981;
  --ok-ink: #047857;
  --ok-soft: #e8f8f1;
  --warn: #b45309;
  --err: #dc2626;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.02);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, 0.10);
  /* Layoutbreiten: Formular/Flow, Lesetext, breite Seiten (Start, Vorschau, Admin) */
  --w-flow: 580px;
  --w-prose: 580px;
  --w-wide: 1120px;
}

/* Inter - lokal gehostet (keine externen Requests) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/inter-800.woff2') format('woff2'); }

/* ---------- 2 Basis ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
  overflow-x: clip; /* vollbreite Baender ohne waagrechtes Scrollen */
}
/* Formularseiten (Editor, Upload, Vorschau, Status): leicht getoenter Grund, weisse Karten */
body:has(.flow-form), body:has(.preview-grid), body:has(.steps), body:has(.konto-list) { background: var(--bg-soft); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
::selection { background: rgba(37, 99, 235, 0.22); }

h1 { font-size: clamp(30px, 2.4vw + 20px, 46px); line-height: 1.12; margin: 18px 0 12px; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(20px, 0.8vw + 16px, 26px); line-height: 1.25; margin: 36px 0 10px; font-weight: 700; letter-spacing: -0.025em; }
h3 { line-height: 1.3; letter-spacing: -0.015em; }
p.lead { color: var(--ink-2); margin-top: 0; font-size: 17px; line-height: 1.6; }

.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.stand { font-size: 13px; color: var(--muted); margin: -4px 0 16px; }
.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; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 2px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.back:hover { color: var(--brand); }

/* ---------- 3 Layout ---------- */
.wrap { max-width: var(--w-flow); margin: 0 auto; padding: 24px 18px 96px; }
.wrap.prose { max-width: var(--w-prose); }
.wrap.wide { max-width: var(--w-wide); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.row { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

@media (max-width: 360px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .row { grid-template-columns: 1fr; gap: 0; }
}
@media (min-width: 720px) {
  :root { --w-flow: 680px; --w-prose: 720px; }
  .wrap { padding: 36px 24px 104px; }
}
@media (min-width: 1024px) {
  :root { --w-flow: 760px; --w-prose: 760px; }
  body { font-size: 16.5px; }
}
@media (min-width: 1440px) {
  :root { --w-wide: 1200px; }
  body { font-size: 17px; }
}

/* ---------- 4 Kopf- und Fusszeile ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: var(--w-wide); margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 12px 20px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.site-header .brand .brand-mark { width: 34px; height: 34px; }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -0.04em; }
.wordmark b { color: var(--ink); font-weight: 800; }
.wordmark span { color: var(--brand); }
.top-nav { display: flex; flex: 1; justify-content: flex-end; gap: 2px; font-size: 15px; }
.top-nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; padding: 7px 12px; border-radius: 999px; font-weight: 500; transition: background .12s ease, color .12s ease; }
.top-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.top-nav a.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 600; }
.top-nav .nav-short { display: none; }
.header-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25); transition: background .15s ease, box-shadow .15s ease; }
.header-cta:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32); }

/* Handy: Logo und Knopf in einer Zeile, darunter das Menue als eine (notfalls wischbare) Zeile */
@media (max-width: 899px) {
  .site-header-inner { flex-wrap: wrap; padding: 10px 16px 0; gap: 2px 12px; }
  .header-cta { margin-left: auto; padding: 7px 13px; font-size: 13.5px; }
  .top-nav {
    order: 3; width: calc(100% + 16px); flex: none; flex-wrap: nowrap; justify-content: flex-start; gap: 2px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin: 0 -8px; padding: 6px 0 8px; font-size: 14px;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { padding: 6px 8px; }
}
@media (max-width: 719px) {
  .top-nav { gap: 4px; font-size: 13.5px; } /* sechs Punkte passen auf 375 px */
  .top-nav a { padding: 5px 3px; }
  .top-nav a.active { background: transparent; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
  .top-nav .nav-long { display: none; }
  .top-nav .nav-short { display: inline; }
}
/* Sehr schmale Handys: Ausblendung rechts zeigt weitere Punkte an */
@media (max-width: 369px) {
  .top-nav { -webkit-mask-image: linear-gradient(to right, #000 86%, transparent); mask-image: linear-gradient(to right, #000 86%, transparent); }
}

/* Schlanker Kopf fuer Bestellstrecke und Admin */
header.site { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 16px 4px; }
header.site .logo { font-weight: 800; font-size: 22px; display: inline-flex; align-items: center; gap: 10px; }
header.site .logo img { width: 34px; height: 34px; }
header.site .tag { color: var(--muted); font-size: 14px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-lockup img { width: 34px; height: 34px; }
.brand-lockup .sub { color: var(--muted); font-weight: 600; font-size: 15px; }

.site-footer { margin-top: 24px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--w-wide); margin: 0 auto; padding: 36px 18px 40px; display: grid; gap: 28px; }
.footer-brand .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-brand .brand img { width: 30px; height: 30px; }
.footer-brand .wordmark { font-size: 19px; }
.footer-claim { margin: 10px 0 0; max-width: 320px; font-size: 14px; color: var(--muted); line-height: 1.55; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px 28px; }
.footer-h { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.footer-nav { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.footer-nav a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-note { color: var(--muted); font-size: 13px; margin: 0; }
.withdraw-link { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: #fff; color: var(--brand-dark); font-weight: 600; font-size: 13px; text-decoration: none; }
.withdraw-link:hover { background: var(--brand-soft); border-color: var(--brand-line); }
@media (max-width: 719px) {
  .footer-nav a { padding: 6px 0; }
}
@media (max-width: 479px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-col:last-child .footer-nav { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: minmax(220px, 1fr) 3fr; gap: 40px; padding: 48px 24px 44px; }
}

/* ---------- 5 Bausteine ---------- */
/* Knoepfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; font: inherit; font-size: 16px; font-weight: 700;
  padding: 14px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--brand); color: #fff; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(37, 99, 235, 0.22);
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), 0 8px 20px rgba(37, 99, 235, 0.28); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--brand-dark); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.btn.danger { background: #fff; color: var(--err); border-color: #f3c9c9; box-shadow: none; }
.link-btn { background: none; border: none; color: var(--brand); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.file-btn { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand-line); border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.file-btn:hover { background: #e3ecff; }

/* Felder */
label { display: block; font-size: 13.5px; color: var(--ink-2); margin: 14px 0 6px; font-weight: 600; }
label .muted { font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input[type="number"], textarea, select, input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: 16px; /* verhindert Zoom auf iOS */
  padding: 12px 14px;
  border: 1px solid #d9e0ec;
  border-radius: var(--radius-sm);
  background: #f7f9fc; /* leicht getoent, damit Felder sich von der weissen Karte abheben */
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:hover, textarea:hover, select:hover { border-color: #b8c3d8; background-color: #f3f6fb; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); background-color: #fff; box-shadow: var(--ring); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
input[type="file"] { padding: 10px; font-size: 14px; color: var(--muted); cursor: pointer; border-style: dashed; border-color: #c3cee3; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--brand-line); border-radius: var(--radius-xs); background: var(--brand-soft); color: var(--brand-dark); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: #e3ecff; }
textarea { min-height: 180px; resize: vertical; }
.field-error { color: var(--err); font-size: 13px; margin-top: 4px; display: none; }
.field-warn { margin: 4px 0 0; font-size: 13px; color: #9a3412; }
.input-invalid { border-color: var(--err); }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 400; color: var(--ink); }
.checkbox-row input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.checkbox-row span { font-size: 14px; }
.checkbox-row.invalid { background: #fdecea; outline: 1px solid #f5c6c0; border-radius: var(--radius-xs); padding: 8px; margin-left: -8px; margin-right: -8px; }
.checkbox-row.invalid span { color: var(--err); }
.checkbox-row.disabled { opacity: .55; cursor: not-allowed !important; }

/* Karten und Flaechen */
.cards { display: grid; gap: 12px; margin-top: 18px; }
.card {
  position: relative; display: block; background: #f0f5ff; border: 1px solid #cddcfd; border-radius: var(--radius);
  padding: 18px 56px 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.card:hover { background: #e8f0ff; box-shadow: var(--shadow); border-color: #b4c8fb; color: var(--ink); transform: translateY(-1px); }
.card:active { transform: none; }
.card .title { font-weight: 700; font-size: 17px; letter-spacing: -0.015em; }
.card .desc { color: var(--muted); font-size: 14.5px; margin-top: 3px; line-height: 1.5; }
.card .arrow {
  position: absolute; right: 18px; top: 50%; margin-top: -15px; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 16px; transition: transform .15s ease, background .15s ease;
}
.card:hover .arrow { transform: translateX(2px); background: var(--brand-dark); }

/* Einstiege: alle Karten gleichwertig – keine wird optisch bevorzugt (Unterschied nur ueber Titel und Symbol) */
.start-card .title { font-size: 18px; }
.start-card:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 10px; background: var(--brand-soft); }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.start-label { margin: 6px 0 10px; font-size: 14px; font-weight: 700; color: var(--brand-dark); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 14px; box-shadow: var(--shadow-sm); }
@media (max-width: 360px) { .panel { padding: 16px; } }

.price-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--ok-soft); color: var(--ok-ink); border: 1px solid #c4ecd9; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; margin: 10px 0; }

/* Hinweise */
.notice { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14.5px; line-height: 1.55; margin-top: 14px; border: 1px solid transparent; }
.notice.error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.notice.info { background: var(--brand-soft); color: var(--brand-deep); border-color: var(--brand-line); }
.notice.ok { background: var(--ok-soft); color: var(--ok-ink); border-color: #c4ecd9; }
.notice.warn { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.notice.warn a, .notice.info a { color: inherit; font-weight: 600; }
.safety { display: flex; gap: 8px; align-items: flex-start; background: var(--ok-soft); border: 1px solid #c4ecd9; color: var(--ok-ink); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px; margin: 12px 0; }
.safety .shield { font-size: 16px; line-height: 1.2; }
.placeholder-box { background: #fffbeb; border: 1px solid #fde68a; color: #6b5200; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 12px 0; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pill.warn { background: #fff3e6; color: var(--warn); }
.pill.err { background: #fdecea; color: var(--err); }
.pill.neutral { background: #eef2f7; color: var(--muted); }

/* Aufklappbare Fragen */
.faq { margin-top: 14px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 0; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; font-weight: 600; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M10 5v10M5 10h10'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .2s ease, background-color .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--brand-soft); }
.faq summary:hover { color: var(--brand-dark); }
.faq p { margin: 0 0 16px; padding-right: 40px; color: var(--ink-2); }

/* Tabellen */
.price-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table thead th { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .02em; background: var(--bg-soft); }
.price-table tbody td:nth-child(2), .price-table tbody td:nth-child(3) { font-weight: 700; color: var(--ink); white-space: nowrap; }
.compare-table tbody td { white-space: normal !important; font-weight: 400 !important; vertical-align: top; }
.compare-table tbody td:nth-child(2) { font-weight: 700 !important; color: var(--brand-dark); background: var(--brand-soft); }
.compare-table th:nth-child(2) { color: var(--brand-dark); }
@media (max-width: 600px) { .compare-table th, .compare-table td { padding: 8px 6px; font-size: 13.5px; } }
@media (max-width: 360px) {
  .price-table { font-size: 13.5px; }
  .price-table th, .price-table td { padding: 8px 6px; }
}

/* ---------- 6 Startseite ---------- */
.home-hero { position: relative; isolation: isolate; display: grid; gap: 8px; padding: 8px 0 28px; }
/* zarter Verlauf ueber die volle Breite */
.home-hero::before { content: ""; position: absolute; z-index: -1; top: -64px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: radial-gradient(ellipse 70% 60% at 85% 30%, #e3ecff 0%, rgba(227, 236, 255, 0) 70%), linear-gradient(180deg, #f4f7ff 0%, #ffffff 100%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-dark); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
.home-hero h1 { margin: 12px 0 16px; font-size: clamp(32px, 2.2vw + 20px, 48px); line-height: 1.08; }
.h1-accent { display: block; color: var(--brand); }
.home-hero p.lead { font-size: 17.5px; max-width: 560px; }
.hero-actions { display: grid; gap: 12px; margin-top: 22px; }
/* Startseite: weisse Karten, der blaue Verlauf dahinter liefert den Kontrast */
/* Flach: Symbol links neben dem Titel, Beschreibung darunter, kleiner Pfeil direkt hinter dem Titel */
.hero-actions .card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 16px 18px; background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.hero-actions .card:hover { background: #fff; border-color: var(--brand-line); }
.hero-actions .card .arrow { display: none; }
.hero-actions .card-icon { width: 36px; height: 36px; margin: 0; border-radius: 10px; }
.hero-actions .card-icon svg { width: 20px; height: 20px; }
.hero-actions .card .title { font-size: 17px; }
.hero-actions .card .title::after { content: "→"; display: inline-block; margin-left: 8px; color: var(--brand); transition: transform .15s ease; }
.hero-actions .card:hover .title::after { transform: translateX(3px); }
.hero-actions .card .desc { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; }
.hero-meta .price-badge { margin: 0; }
.eta { margin: 0; font-size: 12.5px; color: var(--muted); }
.eta strong { color: var(--ink-2); font-weight: 600; }
.eta-note { white-space: nowrap; }
.trust-line { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--muted); }
.trust-line li { display: inline-flex; align-items: center; gap: 7px; }
.trust-line svg, .benefits svg { width: 18px; height: 18px; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hero-visual { margin: 20px auto 0; max-width: 300px; }
.hero-visual svg { width: 100%; height: auto; display: block; }
.hero .hero-logo { width: 68px; height: 68px; }
.hero { text-align: center; padding: 10px 0 4px; }
.hero .claim { color: var(--muted); font-size: 15px; margin-top: 2px; }
.home-hero .cards { margin-top: 22px; }
@media (min-width: 600px) {
  .hero-actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .home-hero { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding: 40px 0 56px; }
  .home-hero h1 { margin-top: 14px; }
  .home-hero p.lead { font-size: 19px; }
  .hero-visual { margin: 0; max-width: 500px; width: 100%; justify-self: end; }
}

/* Vorteile */
.benefits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.benefits li { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.benefits li svg { width: 22px; height: 22px; padding: 9px; box-sizing: content-box; background: var(--brand-soft); border-radius: 12px; }
.benefits strong { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 2px; }
@media (max-width: 719px) {
  .benefits { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
  .benefits li { flex-direction: column; gap: 10px; font-size: 13.5px; }
  .benefits strong { font-size: 14.5px; line-height: 1.3; }
}

/* Schritte */
.how-steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0; }
.how-steps li { position: relative; padding: 14px 0 14px 50px; border-bottom: 1px solid var(--line); }
.how-steps li:last-child { border-bottom: none; }
.how-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 13px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 5px var(--brand-soft); }
.how-steps .hs-title { font-weight: 700; font-size: 16px; }
.how-steps .hs-desc { color: var(--muted); font-size: 14.5px; }

/* Startseite Desktop */
.home h2 { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 6px 0; }
@media (min-width: 1024px) {
  .home .benefits { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 12px; }
  .home .how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .home .how-steps li { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 22px 22px 22px 74px; box-shadow: var(--shadow-sm); }
  .home .how-steps li::before { left: 22px; top: 22px; }
  .home h2 { font-size: 28px; margin-top: 72px; }
  .home .facts, .home .safety, .home .teaser, .home .demo-note { max-width: 760px; }
}

/* Band mit beliebten Vorlagen */
.band { position: relative; margin: 64px 0 8px; padding: 8px 0 30px; background: var(--bg-soft); box-shadow: 0 0 0 100vmax var(--bg-soft); clip-path: inset(0 -100vmax); }
.band .section-head h2 { margin-top: 24px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.tpl { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.tpl:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-tag { font-size: 11.5px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 2px 9px; align-self: flex-start; }
.tpl-title { font-weight: 700; color: var(--ink); font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.tpl.tpl-season { border-color: #bfd3fe; background: linear-gradient(180deg, #f5f8ff, #fff); }
.tpl.tpl-season .tpl-tag { background: var(--brand); color: #fff; }
.band-note { font-size: 14px; color: var(--ink-2); margin: 16px 0 0; line-height: 1.6; }
@media (min-width: 720px) { .template-grid { grid-template-columns: repeat(3, 1fr); } }

.use-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; font-size: 14px; }
.use-links span { color: var(--muted); font-weight: 600; margin-right: 2px; }
.use-links a { text-decoration: none; font-weight: 600; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; color: var(--ink-2); }
.use-links a:hover { border-color: var(--brand-line); color: var(--brand-dark); background: var(--brand-soft); }

/* Fakten */
.facts { padding-left: 20px; margin: 8px 0 14px; line-height: 1.55; }
.facts li { margin: 6px 0; }
.home .facts-grid { max-width: none; list-style: none; padding: 0; display: grid; gap: 0 40px; margin-top: 14px; }
.facts-grid li { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.facts-grid strong { color: var(--ink); }
@media (min-width: 720px) { .home .facts-grid { grid-template-columns: 1fr 1fr; } }
.home-faq details { margin-bottom: 0; }

/* Teaser */
.teaser { background: linear-gradient(180deg, #fff, var(--brand-soft)); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 20px; margin-top: 18px; }
.teaser h2 { margin-top: 0; }
.trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.trust-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; font-size: 13px; box-shadow: var(--shadow-sm); }
.trust-item .ti-title { font-weight: 700; display: block; color: var(--ink); }
.trust-item .ti-desc { color: var(--muted); }
.uses { display: grid; gap: 14px; margin-top: 16px; }
@media (max-width: 360px) { .trust-row { grid-template-columns: 1fr; } }
@media (min-width: 720px) { .uses { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .home .trust-row { grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 32px 0; } }

/* ---------- 7 Inhaltsseiten ---------- */
.prose { line-height: 1.7; }
.prose > p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose h1 { margin-top: 12px; }
.prose h2 { margin-top: 44px; }
.prose h3 { font-size: 17px; margin: 28px 0 8px; }
.prose ul { padding-left: 22px; }
.prose ul li::marker { color: var(--brand); }
.prose ol { padding-left: 24px; }
.prose ol li::marker { color: var(--brand); font-weight: 700; }
.prose li { margin: 7px 0; }
.prose h1, .prose h2, .prose p, .prose li { overflow-wrap: break-word; }

/* Kurzfakten auf Einstiegsseiten */
.prose .offer-facts { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; line-height: 1.35; }
.prose .offer-facts li { margin: 0; padding: 6px 12px 6px 30px; position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.prose .offer-facts li::before { content: ""; position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5'/%3E%3C/svg%3E") center / 12px no-repeat; }

@media (max-width: 479px) {
  .prose .offer-facts { gap: 6px; font-size: 12.5px; }
  .prose .offer-facts li { padding: 5px 9px 5px 26px; }
  .prose .offer-facts li::before { left: 8px; }
}

/* Vorlage als Briefbogen */
.template-box { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 22px 22px 20px; margin: 14px 0 8px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.template-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--brand); }
.template-box p { margin: 0 0 10px; color: var(--ink); }
.template-box p:last-child { margin-bottom: 0; }
.template-subject { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ph { background: #fff4c2; border-radius: 4px; padding: 0 3px; }

/* Passende Vorlagen: kompakte Linkliste */
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.related a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-2); background: #fff; }
.related a:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-dark); }

/* Glossar und Sprungmarken */
.glossary dt { margin-top: 20px; font-weight: 700; scroll-margin-top: 90px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); }
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; font-size: 14.5px; }
.jump-nav a { padding: 6px 13px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink-2); }
.jump-nav a:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }
.prose h2[id], .vorlagen-page h2[id] { scroll-margin-top: 90px; }
@media (min-width: 900px) {
  .wrap.vorlagen-page { max-width: 880px; }
  .vorlagen-page .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fristenrechner */
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline select { max-width: 160px; }
#fristForm .row-inline input { width: 110px; flex: none; }
.frist-big { font-size: 24px; font-weight: 800; color: var(--ink); margin: 2px 0 10px; letter-spacing: -0.02em; }
.frist-label { font-size: 13px; color: var(--muted); font-weight: 700; margin: 10px 0 0; }
.frist-hint { font-size: 14px; color: var(--ink); margin: -4px 0 10px; }
.reminder-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.reminder-form .checkbox-row { margin-top: 10px; }

/* Kontaktformular */
.topic-group { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; }
.topic-group legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.topic-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.topic-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); }
.topic-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.topic-chip input:focus-visible + span { box-shadow: var(--ring); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 8 Kuendigung ---------- */
.provider-finder { margin: 20px 0 22px; padding: 22px 20px 20px; background: linear-gradient(180deg, #f2f6ff, #eaf0ff); border: 1px solid var(--brand-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.prose .provider-finder h2 { margin: 0 0 4px; font-size: 21px; line-height: 1.3; }
.prose .provider-finder > p { margin: 0 0 14px; }
.provider-finder input[type="search"] { font-size: 17px; padding: 14px 16px 14px 46px; border-color: #a9c0fb; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 15px center / 20px no-repeat; box-shadow: var(--shadow-sm); }
.provider-finder input[type="search"]:focus { box-shadow: var(--ring); }
.prose .provider-hits { list-style: none; margin: 8px 0 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.prose .provider-hits li { margin: 0; }
.provider-hits a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 12px; border-radius: var(--radius-xs); text-decoration: none; color: var(--ink); font-weight: 600; }
.provider-hits a:hover, .provider-hits a:focus-visible { background: var(--brand-soft); }
.provider-hits .hit-cat { font-size: 13px; font-weight: 400; color: var(--muted); text-align: right; }
.prose .finder-none { font-size: 14px; margin: 8px 0 0; }
.prose .finder-popular { margin: 16px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.prose .provider-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prose .provider-chips li { margin: 0; }
.provider-chips a { display: inline-block; padding: 7px 13px; background: #fff; border: 1px solid var(--brand-line); border-radius: 999px; font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--brand-dark); transition: border-color .12s ease, box-shadow .12s ease; }
.provider-chips a:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.prose .finder-all { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.provider-strip { margin: 22px 0 8px; padding: 18px 20px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius); }
.prose .provider-strip h2 { margin: 0 0 4px; font-size: 19px; }
.prose .provider-strip > p { margin: 0 0 12px; }
.prose .provider-list { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; column-gap: 18px; }
.prose .provider-list li { break-inside: avoid; margin: 0; padding: 4px 0; line-height: 1.4; }
.provider-list a { text-decoration: none; font-weight: 500; }
.provider-list a:hover { text-decoration: underline; }
@media (min-width: 720px) { .prose .provider-list { columns: 3; } }
.address-box { padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); background: #fff; line-height: 1.65; box-shadow: var(--shadow-sm); font-size: 16px; }
/* Editor: Anbietersuche beim Empfaenger (nur bei Kuendigungsvorlagen) */
.provider-pick { margin: 6px 0 6px; padding: 14px 14px 6px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); }
.provider-pick > label { margin-top: 0; }
.provider-pick input[type="search"] { background-color: #fff; }
.provider-pick .provider-hits, .provider-pick .provider-chips { list-style: none; padding: 0; }
.provider-pick .provider-hits { margin: 8px 0 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.provider-pick .provider-chips { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.provider-pick li { margin: 0; }
.provider-hits button { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 12px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; box-shadow: none; }
.provider-hits button:hover, .provider-hits button:focus-visible { background: var(--brand-soft); }
.provider-chips button { display: inline-block; width: auto; padding: 7px 13px; background: #fff; border: 1px solid var(--brand-line); border-radius: 999px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--brand-dark); cursor: pointer; box-shadow: none; }
.provider-chips button:hover { border-color: var(--brand); }
.provider-pick .hint:empty { display: none; }

/* ---------- 9 Editor und Upload ---------- */
.flow-form .panel { padding: 18px 18px 20px; margin-top: 16px; }
/* Kopfzeile jeder Karte mit Trennlinie, damit die Abschnitte klar getrennt sind */
.flow-form .panel > h2:first-child { margin: -18px -18px 6px; padding: 14px 18px 12px; font-size: 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfcfe, #fff); border-radius: var(--radius) var(--radius) 0 0; }
.flow-form .panel > h2:first-child + .hint { margin-top: 8px; }
.flow-form label { margin: 12px 0 5px; }
.flow-form input[type="text"], .flow-form input[type="email"], .flow-form input[type="date"], .flow-form input[type="number"], .flow-form select, .flow-form input[type="file"] { padding-top: 10px; padding-bottom: 10px; }
.flow-form input[type="file"] { padding: 6px; }
.flow-form .checkbox-row { margin-top: 12px; }
.flow-form .opt-h { margin: 18px 0 0; padding-top: 14px; }
.flow-form .mode-switch { padding-top: 12px; padding-bottom: 12px; }
.opt-h { font-size: 15.5px; margin: 22px 0 2px; padding-top: 16px; border-top: 1px solid var(--line); }
.step-hint { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Umschalter Einzelbrief / Serienbrief */
.mode-switch { padding-top: 14px; padding-bottom: 14px; }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.seg-btn { border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .12s ease; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
@media (max-width: 360px) { .seg-btn { padding: 7px 12px; } }

/* Schrittnavigation (Handy: Leiste oben, Desktop: links) */
.flow-nav { position: sticky; top: 0; z-index: 20; background: var(--bg-soft); margin: 8px -18px 0; padding: 10px 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.flow-nav::-webkit-scrollbar { display: none; }
.flow-nav ol { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flow-nav li { counter-increment: step; flex: none; }
.flow-nav li[hidden] { display: none; }
.flow-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.flow-nav a::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.flow-nav li.done a { color: var(--ink); }
.flow-nav li.done a::before { content: '✓'; background: var(--ok-soft); color: var(--ok-ink); }
.flow-nav li.active a { color: var(--brand-dark); border-color: var(--brand-line); background: var(--brand-soft); }
.flow-nav li.active a::before { background: var(--brand); color: #fff; }
@media (min-width: 1000px) {
  .wrap.flow-wrap { max-width: calc(var(--w-flow) + 250px); }
  .flow-wrap > .back, .flow-wrap > h1, .flow-wrap > .lead, .flow-wrap > .hint, .flow-wrap > .notice { margin-left: 250px; }
  .flow-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; align-items: start; }
  .flow-nav { top: 24px; margin: 12px 0 0; padding: 0; border: 0; overflow: visible; background: transparent; }
  .flow-nav ol { flex-direction: column; gap: 2px; }
  .flow-nav a { width: 100%; border-color: transparent; background: transparent; padding: 8px 10px 8px 6px; font-size: 14px; border-radius: 10px; }
  .flow-nav a:hover { background: #fff; color: var(--ink); }
  .flow-nav li.active a { background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); }
}

/* Serienbrief */
.batch-actions { display: flex; align-items: center; gap: 14px; margin: 10px 0; flex-wrap: wrap; }
.recip-summary { margin: 10px 0 6px; font-size: 14px; font-weight: 600; color: var(--ok-ink); background: var(--ok-soft); border: 1px solid #c4ecd9; border-radius: 10px; padding: 8px 12px; }
.recip-summary.has-invalid { color: var(--warn); background: #fffbeb; border-color: #fde68a; }
.recip-summary[hidden] { display: none; }
.recip-list { list-style: none; padding: 0; margin: 8px 0 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.recip-list:empty { display: none; }
.recip-list li { padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.recip-list li:last-child { border-bottom: none; }
.recip-list li.ok { color: var(--ink); }
.recip-list li.bad { color: var(--err); background: #fdecea; }
.recip-list li.more { color: var(--muted); font-style: italic; justify-content: center; }
.recip-problem { font-size: 12px; color: var(--err); font-weight: 600; flex: none; }

/* Brieftext und Druckoptionen */
.text-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 12px 12px 0 0; background: var(--bg-soft); }
.text-toolbar button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: white; color: var(--ink); cursor: pointer; font-size: 17px; }
.text-toolbar button:hover { border-color: var(--line-strong); }
.text-toolbar button[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.text-toolbar label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.text-toolbar input[type="color"] { width: 48px; height: 44px; padding: 3px; cursor: pointer; }
.swatches { display: inline-flex; gap: 6px; align-items: center; }
.text-toolbar .swatch { min-width: 36px; width: 36px; min-height: 36px; height: 36px; border-radius: 50%; padding: 0; background: var(--sw); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.text-toolbar .swatch:hover, .text-toolbar .swatch:focus-visible { box-shadow: 0 0 0 2px var(--brand); outline: none; }
@media (pointer: coarse) { .text-toolbar .swatch { width: 40px; min-width: 40px; height: 40px; min-height: 40px; } }
@media (max-width: 479px) {
  .text-toolbar { gap: 6px; }
  .text-toolbar .cc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .swatches { gap: 6px; }
}
.rich-editor { min-height: 280px; padding: 16px; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 12px 12px; background: white; color: #000000; font-weight: 400; font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich-editor:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.rich-editor:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.rich-editor.input-invalid { border-color: var(--err); }
.rich-editor ::selection, .rich-editor::selection { background: rgba(37, 99, 235, 0.28); }
@media (min-width: 1024px) {
  .text-toolbar { gap: 10px; }
  .rich-editor { min-height: 360px; }
}
select#colorPrint { width: 100%; min-height: 48px; }
.flow-form select#colorPrint { min-height: 44px; }
.pdf-grayscale { filter: grayscale(1); }

/* Unterschrift, Rechnungsadresse, Adressbuch, Entwurf */
.signature-box, .billing-box { margin: 14px 0 4px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; }
.signature-box summary, .billing-box summary { cursor: pointer; font-weight: 600; }
.billing-box .btn { margin-top: 12px; }
.sig-pad { display: block; width: 100%; height: 150px; margin-top: 8px; border: 1px dashed #b8c4da; border-radius: var(--radius-xs); background: #fafcff; touch-action: none; cursor: crosshair; }
.sig-actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.sig-actions label { margin: 0; font-weight: 400; }
.book-pick { margin: 0 0 6px; }
.book-pick[hidden] { display: none; }
.book-row { display: flex; gap: 10px; align-items: center; }
.book-row select { flex: 1; min-width: 0; }
.draft-link-out { margin-top: 10px; font-size: 14px; }
.draft-link-url { width: 100%; margin: 6px 0; font-size: 13px; }

/* Platzhalter-Leiste im Editor */
.ph-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; padding: 9px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; font-size: 14px; color: #5b4500; }
.ph-bar[hidden] { display: none; }
.ph-bar .link-btn { font-size: 14px; }

/* Dateien */
.file-list { margin: 8px 0 0; padding-left: 22px; font-size: 14px; }
.file-list li { margin: 4px 0; overflow-wrap: anywhere; }
.file-list .file-name { font-weight: 600; }
.file-remove { margin-left: 8px; background: none; border: 0; padding: 4px 2px; color: var(--brand); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* Feste Leiste unten: Preis, Ankunft, Hauptknopf */
.sticky-cta { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 72%, rgba(255, 255, 255, 0)); padding: 14px 0 8px; margin-top: 20px; }
/* Editor/Upload: wenig Abstand zwischen letzter Karte und Absende-Knopf */
.flow-form .sticky-cta { margin-top: 4px; padding-top: 6px; }
.flow-form .cta-info { padding-top: 0; }
body:has(.flow-form) .sticky-cta, body:has(.preview-grid) .sticky-cta { background: linear-gradient(to top, var(--bg-soft) 72%, rgba(245, 247, 251, 0)); }
.sticky-cta[hidden] { display: none; }
/* Inhaltsseiten am Desktop: Die Kopfzeile hat den Knopf, daher keine feste Leiste, sondern ein normaler Knopf am Seitenende */
@media (min-width: 900px) {
  .sticky-cta:has(> a.btn) { position: static; background: none; padding: 8px 0 0; margin-top: 32px; }
  .sticky-cta > a.btn { width: auto; padding-left: 32px; padding-right: 32px; }
}
.cta-info { margin: 0; padding: 6px 0 8px; font-size: 13px; color: var(--muted); }
.cta-info #ctaPrice { font-weight: 700; color: var(--ink); }
.cta-info #ctaPrice[hidden] { display: none; }
.cta-price { font-size: 14px; font-weight: 700; color: var(--ink); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; text-align: center; }
.cta-price[hidden] { display: none; }

/* ---------- 10 Vorschau, Status, Konto, Admin ---------- */
.pdf-frame { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); }
.preview-grid { display: block; }
.preview-side > .panel:first-of-type { margin-top: 14px; }
.pdf-open { margin: 8px 0 0; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; }
.summary .total { font-size: 22px; font-weight: 800; white-space: nowrap; letter-spacing: -0.02em; }
@media (min-width: 1024px) {
  .wrap.preview { max-width: var(--w-wide); }
  .preview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 28px; align-items: start; }
  .preview-grid .pdf-frame { height: calc(100vh - 140px); min-height: 640px; position: sticky; top: 20px; }
  .preview-side > .panel:first-child { margin-top: 0; }
  .preview-side .sticky-cta { position: static; background: none; padding-top: 4px; }
}

/* Fortschritt (Bestellstrecke) */
.progress { display: flex; gap: 6px; margin: 4px 0 14px; }
.progress .pstep { flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 6px; border-bottom: 3px solid var(--line); }
.progress .pstep.active { color: var(--brand); border-color: var(--brand); font-weight: 700; }
.progress .pstep.done { color: var(--ok-ink); border-color: var(--ok); }

/* Statusseite: aktuelle Stufe eindeutig, kommende Stufen grau */
.steps { list-style: none; padding: 0; margin: 16px 0; }
.steps li { position: relative; display: flex; gap: 14px; padding: 12px 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 40px; bottom: -8px; width: 2px; background: var(--line); }
.steps li.done:not(:last-child)::after { background: #a7e3cb; }
.dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft); border: 2px solid var(--line); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps li.current .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.steps .s-label { font-weight: 600; }
.steps .s-time { color: var(--muted); font-size: 12.5px; }
.steps li:not(.done):not(.current) .dot { color: var(--muted); }
.steps li:not(.done):not(.current) .s-label { color: var(--muted); }
.steps li.current .s-label { color: var(--brand-dark); }
.s-now { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 700; vertical-align: 1px; }

/* Kundenkonto */
.konto-list, .prose .konto-list { list-style: none; padding: 0; margin: 10px 0 0; }
.konto-order { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.konto-order .ko-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.konto-order .ko-id, .konto-order .pill { white-space: nowrap; }
.konto-order .ko-id { font-weight: 700; }
.konto-order .ko-sub { font-size: 13px; margin-top: 2px; }
.konto-order .ko-main { flex: 1 1 220px; min-width: 0; }
.konto-order .ko-link { flex: none; width: auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
.konto-order .ko-withdraw { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; }
@media (max-width: 480px) { .konto-order .ko-link { flex: 1 1 100%; } }

/* Admin */
.admin-info { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.admin-warn { color: var(--err); font-weight: 600; }

/* Hinweis bei Tippfehlern in der E-Mail-Adresse (email-hint.js) */
.email-hint { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
