/* ==========================================================================
   Ziffra — Design-System
   "Formular trifft Fintech" — pr\u00e4zise, vertrauensw\u00fcrdig, deutsch-n\u00fcchtern.
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- Tokens ---- */
:root {
  --ink: #1C1F1D;
  --paper: #F6F7F6;
  --primary: #14532D;
  --primary-strong: #0E3B20;
  --accent: #B45309;
  --ok: #15803D;
  --no: #B91C1C;

  --surface: #FFFFFF;
  --muted: #52605A;
  --border: #D8DDD9;
  --border-strong: #C2C9C4;
  --ok-bg: #F0FaF3;
  --no-bg: #FCF2F2;
  --info-bg: #F0F4F2;
  --warn-bg: #FBF5EC;

  --shadow-sm: 0 1px 2px rgba(28,31,29,0.06);
  --shadow-md: 0 4px 14px rgba(28,31,29,0.08);
  --radius: 8px;
  --radius-lg: 14px;

  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: 40px; letter-spacing: -0.01em; }
h2 { font-size: 28px; letter-spacing: -0.005em; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { max-width: 72ch; }
a { color: var(--primary); }
a:hover { color: var(--primary-strong); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
}

/* ---- Layout ---- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-header h2 { margin-bottom: 14px; }
.section-header p { color: var(--muted); font-size: 18px; margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---- Focus visibility ---- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Announcement bar ---- */
.announce {
  background: var(--primary); color: #fff;
  padding: 10px 44px 10px 24px; text-align: center;
  font-size: 15px; position: relative;
}
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.announce .num { font-weight: 600; }
.announce-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.75);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 6px;
}
.announce-close:hover { color: #fff; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,247,246,0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand svg { display: block; height: 22px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 20px; line-height: 1; padding: 6px 10px; cursor: pointer; color: var(--ink); }

@media (max-width: 860px) {
  .nav-links, .nav-cta .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); padding: 20px 24px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-strong); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #92400E; color: #fff; }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary-strong); }
.btn--light { background: var(--surface); color: var(--primary); border-color: var(--border); }
.btn--light:hover { border-color: var(--border-strong); }
.btn--lg { padding: 15px 30px; font-size: 17px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- Card ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* ---- Ziffern-Chip (gestempeltes Formularfeld) ---- */
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 1px 1px 0 rgba(20,83,45,0.12);
}
.chip:nth-of-type(2n) { transform: rotate(-1.2deg); }
.chip:nth-of-type(3n) { transform: rotate(0.8deg); }
.chip--accent { color: var(--accent); border-color: #E7C9A3; box-shadow: 1px 1px 0 rgba(180,83,9,0.12); }
.chip--struck {
  color: var(--no); border-color: #E6BDBD; background: var(--no-bg);
  text-decoration: line-through; text-decoration-thickness: 2px;
  box-shadow: none;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: var(--info-bg); color: var(--primary);
  border: 1px solid var(--border);
}
.badge--accent { background: var(--warn-bg); color: var(--accent); border-color: #EAD7BC; }

/* ---- Hinweisbox (Info / Warnung) ---- */
.notice {
  border-radius: var(--radius); padding: 18px 20px;
  font-size: 15px; line-height: 1.65; margin: 20px 0;
  border: 1px solid var(--border);
}
.notice strong { color: var(--ink); }
.notice--info { background: var(--info-bg); border-color: var(--border); }
.notice--warn { background: var(--warn-bg); border-color: #EAD7BC; }
.notice--warn strong { color: var(--accent); }

/* ---- Accordion (FAQ) ---- */
.accordion { max-width: 760px; margin: 0 auto; }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-trigger {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-family: var(--sans); font-size: 17px; font-weight: 600; color: var(--ink);
}
.acc-trigger .acc-icon { flex-shrink: 0; font-size: 22px; color: var(--primary); transition: transform 0.2s ease; }
.acc-item.open .acc-trigger .acc-icon { transform: rotate(45deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.acc-item.open .acc-panel { max-height: 520px; }
.acc-panel-inner { padding: 0 0 18px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.acc-panel-inner a { color: var(--primary); }


/* ---- Hero ---- */
.hero { padding: 64px 0 56px; }
.hero .container { display: grid; gap: 40px; }
.hero-mock {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow-md);
}
.hero-mock__case { padding: 26px 28px; border-right: 1px solid var(--border); }
.hero-mock__case .label,
.hero-mock__result .label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.04em; margin-bottom: 12px; text-transform: none;
}
.hero-mock__case p { font-size: 15px; color: var(--ink); line-height: 1.6; margin: 0; }
.hero-mock__result { padding: 26px 28px; background: var(--info-bg); }
.hero-mock__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.hero-mock__row:last-of-type { border-bottom: none; }
.hero-mock__legend { font-size: 14px; color: var(--muted); }
.hero-mock__amount { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; color: var(--ink); }
.hero-mock__sum {
  margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--primary);
  display: flex; justify-content: space-between; align-items: baseline;
}
.hero-mock__sum .total { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 20px; color: var(--primary); }
.hero-mock__note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.hero-copy { text-align: center; max-width: 720px; margin: 0 auto; }
.hero-copy h1 { margin-bottom: 16px; }
.hero-copy .lead { font-size: 19px; color: var(--muted); margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-fine { margin-top: 16px; font-size: 14px; color: var(--muted); }

@media (max-width: 720px) {
  .hero-mock { grid-template-columns: 1fr; }
  .hero-mock__case { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ---- USP strip ---- */
.usp-strip { background: var(--surface); border-bottom: 1px solid var(--border); }
.usp-strip .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.usp { font-size: 14px; font-weight: 500; color: var(--ink); background: var(--info-bg); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }

/* ---- Compliance (ok / no) ---- */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1000px; margin: 0 auto; }
.panel { border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--border); }
.panel--ok { background: var(--ok-bg); border-color: #BFE3CB; }
.panel--no { background: var(--no-bg); border-color: #E6BDBD; }
.panel h3 { font-size: 17px; margin-bottom: 14px; }
.panel--ok h3 { color: var(--ok); }
.panel--no h3 { color: var(--no); }
.panel ul { list-style: none; }
.panel li { font-size: 15px; line-height: 1.55; padding: 5px 0; display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.panel li .m { flex-shrink: 0; font-family: var(--mono); font-weight: 600; }
.panel--ok li .m { color: var(--ok); }
.panel--no li .m { color: var(--no); }
@media (max-width: 720px) { .split-grid { grid-template-columns: 1fr; } }

/* ---- Steps ---- */
.steps { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; gap: 20px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.step-num { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
@media (max-width: 560px) { .step { flex-direction: column; gap: 12px; } }

/* ---- Trust ---- */
.trust { background: var(--primary); color: #fff; text-align: center; }
.trust h2 { color: #fff; margin-bottom: 12px; }
.trust p { color: rgba(255,255,255,0.85); max-width: 620px; margin: 0 auto 28px; }
.trust-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.trust-item { font-size: 14px; font-weight: 500; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 7px 15px; }

/* ---- Pricing ---- */
.billing-toggle { display: flex; justify-content: center; margin: 8px 0 6px; }
.billing-toggle button {
  padding: 10px 22px; border: 1.5px solid var(--border-strong); background: var(--surface);
  cursor: pointer; font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--ink);
}
.billing-toggle button:first-child { border-radius: 8px 0 0 8px; }
.billing-toggle button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.billing-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.billing-toggle .save { font-size: 12px; font-weight: 700; margin-left: 6px; padding: 2px 6px; border-radius: 4px; background: var(--ok-bg); color: var(--ok); }
.billing-toggle button.active .save { background: rgba(255,255,255,0.22); color: #fff; }
.netto-hint { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.trial-note { text-align: center; font-weight: 600; color: var(--ok); margin-top: 8px; }
.trial-sub { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 4px; }

.plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1180px; margin: 0 auto; }
.plan { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; width: 270px; display: flex; flex-direction: column; position: relative; }
.plan--featured { border: 2px solid var(--primary); box-shadow: var(--shadow-md); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan-name { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.plan-desc { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.plan-price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.plan-price .per { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--muted); }
.plan-price .ab { font-family: var(--sans); font-size: 16px; font-weight: 400; color: var(--muted); }
.plan-price .cur { font-size: 20px; vertical-align: super; }
.plan-note { font-size: 13px; color: var(--muted); margin-bottom: 18px; min-height: 20px; }
.plan-features { list-style: none; margin-bottom: 22px; flex-grow: 1; }
.plan-features li { font-size: 14px; line-height: 1.45; padding: 5px 0; display: flex; gap: 8px; align-items: flex-start; }
.plan-features li::before { content: '\2713'; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.plan-features li.off::before { content: '\2013'; color: var(--muted); }
@media (max-width: 620px) { .plan { width: 100%; max-width: 360px; } }

.value-card { max-width: 720px; margin: 40px auto 0; text-align: center; }
.value-card p { margin: 12px auto 0; color: var(--ink); }

/* ---- Page header (legal & landing sub-pages) ---- */
.page-header { padding: 56px 0 40px; text-align: center; border-bottom: 1px solid var(--border); }
.page-header h1 { margin-bottom: 10px; }
.page-header p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* ---- Legal content ---- */
.legal { max-width: 780px; margin: 0 auto; padding: 48px 24px 72px; }
.legal h2 { font-size: 20px; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--primary); }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 16px; margin: 22px 0 8px; }
.legal p { margin-bottom: 12px; font-size: 16px; color: var(--ink); line-height: 1.7; max-width: none; }
.legal ul, .legal ol { margin: 8px 0 16px 22px; font-size: 16px; line-height: 1.7; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--primary); }
.legal-date { color: var(--muted); font-size: 14px; margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { background: var(--info-bg); font-weight: 600; color: var(--primary); }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px; }
.info-card h3 { color: var(--primary); margin-bottom: 12px; }
.info-card p { margin-bottom: 6px; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.62); padding: 48px 0 28px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { max-width: 320px; }
.footer-brand svg { height: 20px; width: auto; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-col h4 { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 22px; }
.footer-legal .container { display: block; }
.footer-disclaimer { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.42); margin-bottom: 16px; }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.5); }
@media (max-width: 720px) { .footer-meta { flex-direction: column; text-align: center; } .site-footer .container { flex-direction: column; } }

/* ---- Auth / Login ---- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-md); }
.auth-head { text-align: center; margin-bottom: 8px; }
.auth-head svg { height: 22px; width: auto; }
.auth-head p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.tabs { display: flex; border-bottom: 2px solid var(--border); margin: 24px 0 20px; }
.tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; background: none; border-top: none; border-left: none; border-right: none; font-family: var(--sans); font-size: 15px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.field input[type=text], .field input[type=email], .field input[type=password], .field select {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-strong); border-radius: 8px;
  font-size: 16px; font-family: var(--sans); color: var(--ink); background: var(--surface); outline: none;
}
.field input:focus, .field select:focus { border-color: var(--primary); }
.field-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.field-check input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--primary); }
.field-check a { color: var(--primary); }
.pw-strength { height: 3px; border-radius: 2px; margin-top: 6px; transition: width 0.3s, background 0.3s; }
.msg { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: none; }
.msg--error { background: var(--no-bg); color: var(--no); }
.msg--ok { background: var(--ok-bg); color: var(--ok); }
.divider { display: flex; align-items: center; margin: 20px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.divider span { padding: 0 12px; }
.btn-social { width: 100%; margin-bottom: 10px; background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--ink); }
.btn-social:hover { border-color: var(--primary); }
.btn-social svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

/* ---- Countdown (Spargesetz) ---- */
.countdown { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.cd-unit { text-align: center; }
.cd-num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 600; line-height: 1; min-width: 76px; color: var(--ink); }
.cd-label { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; margin-top: 6px; }
.cd-sep { font-family: var(--mono); font-size: clamp(2rem, 5vw, 2.8rem); color: var(--border-strong); align-self: flex-start; padding-top: 4px; }
.cd-expired { max-width: 620px; margin: 0 auto 36px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cd-expired strong { color: var(--ink); }
@media (max-width: 640px) { .cd-sep { display: none; } }

/* ---- Sparliste (struck chip cards) ---- */
.sparliste { max-width: 940px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.spar-item { position: relative; background: var(--no-bg); border: 1px solid #E6BDBD; border-radius: var(--radius); padding: 20px; }
.spar-code { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 20px; color: var(--no); text-decoration: line-through; text-decoration-thickness: 2px; }
.spar-desc { font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.spar-stamp { position: absolute; top: 14px; right: 14px; transform: rotate(-7deg); font-family: var(--mono); font-size: 9px; font-weight: 600; color: var(--no); border: 1.5px solid var(--no); padding: 2px 6px; letter-spacing: 0.04em; opacity: 0.75; }
@media (max-width: 640px) { .sparliste { grid-template-columns: 1fr; } }

/* ---- Zi table / steuerbar / cta / sources / disclaimer ---- */
.data-table-wrap { max-width: 720px; margin: 0 auto; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); border-bottom: 2px solid var(--border); }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .amount { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--no); text-align: right; }
.table-source, .zi-table-source { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.grid-3 { max-width: 940px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
.cta-block { max-width: 720px; margin: 0 auto; background: var(--primary); border-radius: var(--radius-lg); padding: 44px 36px; text-align: center; color: #fff; }
.cta-block h2 { color: #fff; margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,0.85); margin: 0 auto 26px; }
.sources { max-width: 720px; margin: 0 auto; }
.sources h3 { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.sources ul { list-style: none; }
.sources li { font-size: 14px; color: var(--muted); padding: 6px 0; display: flex; gap: 8px; }
.sources li::before { content: '\2192'; color: var(--primary); flex-shrink: 0; }
.sources a { color: var(--primary); }
.page-note { max-width: 720px; margin: 32px auto 0; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .chip { transform: none !important; }
}

/* ==========================================================================
   App-Dashboard (app.html) — extrahiert aus vormals inline CSS
   ========================================================================== */
body.app-body {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --error: #dc2626;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}

/* Header */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header-left { display: flex; align-items: center; gap: 12px; }
.app-header h1 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header-logo {
  height: 32px;
  width: auto;
  border-radius: 4px;
  -webkit-text-fill-color: initial;
}
.app-header-right { display: flex; align-items: center; gap: 16px; }
.app-tier-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.app-tier-free { background: #f1f5f9; color: var(--muted); }
.app-tier-starter { background: #dbeafe; color: #1e40af; }
.app-tier-praxis { background: #faf5ff; color: #7c3aed; }
.app-tier-enterprise { background: #fef3c7; color: #b45309; }
.app-user-menu { position: relative; cursor: pointer; }
.app-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}
.app-user-dropdown {
  position: absolute;
  right: 0;
  top: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  min-width: 220px;
  display: none;
  z-index: 200;
}
.app-user-dropdown.show { display: block; }
.app-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}
.app-dropdown-item:hover { background: #f1f5f9; }
.app-dropdown-item:first-child { border-radius: 12px 12px 0 0; }
.app-dropdown-item:last-child { border-radius: 0 0 12px 12px; }
.app-dropdown-divider { border-top: 1px solid var(--border); }
.app-dropdown-header {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

/* Layout */
.app-layout { display: flex; height: calc(100vh - 57px); }

/* Sidebar — Abo-Übersicht */
.app-sidebar {
  width: 300px;
  border-right: 1px solid var(--border);
  background: var(--card);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-sidebar-card { background: var(--bg); border-radius: var(--radius); padding: 16px; }
.app-sidebar-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.app-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
}
.app-stat-label { color: var(--muted); }
.app-stat-value { font-weight: 600; }
.app-quota-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.app-quota-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.app-quota-ok { background: var(--success); }
.app-quota-warn { background: var(--warning); }
.app-quota-full { background: var(--error); }
.app-btn-sm {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}
.app-btn-upgrade {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  width: 100%;
}
.app-btn-upgrade:hover { opacity: 0.9; }
.app-btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  width: 100%;
}
.app-btn-outline:hover { background: var(--bg); }
.app-sub-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-top: 8px;
}
.app-dot { width: 8px; height: 8px; border-radius: 50%; }
.app-dot-active { background: var(--success); }
.app-dot-cancel { background: var(--warning); }
.app-dot-free { background: var(--muted); }

/* Chat */
.app-chat-area { flex: 1; display: flex; flex-direction: column; }
.app-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-message {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
}
.app-msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.app-msg-bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.app-msg-bot pre {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  margin: 8px 0;
}
/* Markdown typography inside bot messages */
.app-msg-bot p { margin: 0 0 8px; }
.app-msg-bot p:last-child { margin-bottom: 0; }
.app-msg-bot ul, .app-msg-bot ol { margin: 6px 0; padding-left: 20px; }
.app-msg-bot li { margin-bottom: 4px; }
.app-msg-bot li::marker { color: var(--primary, #2563eb); }
.app-msg-bot code {
  background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
  font-size: 13px; font-family: 'IBM Plex Mono', monospace;
}
.app-msg-bot pre code { background: none; padding: 0; }
.app-msg-bot h1, .app-msg-bot h2, .app-msg-bot h3,
.app-msg-bot h4, .app-msg-bot h5, .app-msg-bot h6 {
  margin: 12px 0 6px; font-weight: 600;
}
.app-msg-bot h1 { font-size: 18px; }
.app-msg-bot h2 { font-size: 16px; }
.app-msg-bot h3 { font-size: 15px; }
.app-msg-bot blockquote {
  border-left: 3px solid var(--primary, #2563eb);
  margin: 8px 0; padding: 4px 12px;
  color: var(--muted, #64748b); font-style: italic;
}
.app-msg-bot table {
  border-collapse: collapse; margin: 8px 0; font-size: 13px; width: 100%;
}
.app-msg-bot th, .app-msg-bot td {
  border: 1px solid var(--border, #e2e8f0);
  padding: 6px 10px; text-align: left;
}
.app-msg-bot th { background: #f8fafc; font-weight: 600; }
.app-msg-bot strong { font-weight: 600; }
.app-msg-bot a { color: var(--primary, #2563eb); text-decoration: underline; }
.app-msg-bot hr { border: none; border-top: 1px solid var(--border, #e2e8f0); margin: 12px 0; }
.app-msg-typing {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 20px;
}
.app-typing-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: app-bounce 1.4s infinite both;
}
.app-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.app-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes app-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}
.app-welcome-msg { text-align: center; padding: 60px 40px; color: var(--muted); }
.app-welcome-msg h2 { font-size: 22px; margin-bottom: 8px; color: var(--text); }
.app-welcome-msg p { font-size: 15px; }
.app-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.app-example-chip {
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.app-example-chip:hover { background: #eef2ff; border-color: var(--primary); }

/* Input */
.app-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.app-input-wrap { display: flex; gap: 10px; align-items: flex-end; }
.app-input-wrap textarea {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  resize: none;
  min-height: 46px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s;
}
.app-input-wrap textarea:focus { border-color: var(--primary); }
.app-send-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.app-send-btn:hover { background: var(--primary-hover); }
.app-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.app-send-btn svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .app-sidebar { display: none; }
  .app-header h1 { font-size: 16px; }
  .app-messages { padding: 16px; }
  .app-message { max-width: 90%; }
}

/* Success Banner */
.app-checkout-banner {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--success);
  font-weight: 500;
  display: none;
}

/* Auth overlay / toast (moved from app.html inline <style> for F-01) */
.app-auth-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg, #fff);
  font: 500 15px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--muted, #555); gap: 12px;
}
.app-auth-overlay[hidden] { display: none; }
.app-auth-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,.15); border-top-color: currentColor;
  animation: app-spin .8s linear infinite;
}
@keyframes app-spin { to { transform: rotate(360deg); } }
.app-toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 2100;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.app-toast {
  padding: 12px 16px; border-radius: 8px; color: #fff;
  font: 500 14px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.app-toast-info { background: #334155; }
.app-toast-success { background: #16a34a; }
.app-toast-error { background: #dc2626; }

/* ---- Catalog Selection ---- */
.app-catalog-select {
  display: flex; gap: 16px; margin-top: 20px;
  flex-wrap: wrap; justify-content: center;
}
.app-catalog-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 24px 28px; border-radius: 12px;
  border: 2px solid var(--border, #dde3df);
  background: var(--surface); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  min-width: 160px;
}
.app-catalog-btn:hover, .app-catalog-btn:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(20,83,45,.12);
  transform: translateY(-2px);
}
.app-catalog-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.app-catalog-icon { font-size: 32px; }
.app-catalog-label {
  font: 700 18px/1 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--primary);
}
.app-catalog-desc {
  font: 400 13px/1.3 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--muted);
}

/* ---- Catalog Badge ---- */
.app-catalog-badge {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  font: 600 12px/1.6 'IBM Plex Mono', monospace;
  background: var(--primary); color: #fff;
  margin-left: 8px; vertical-align: middle;
}

/* ---- Mic Button ---- */
.app-mic-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--surface);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.app-mic-btn:hover { background: #f0f0f0; color: var(--primary); }
.app-mic-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.app-mic-recording {
  background: #fee2e2 !important; color: #dc2626 !important;
  animation: app-mic-pulse 1.2s ease-in-out infinite;
}
.app-mic-processing {
  background: #fef3c7 !important; color: #d97706 !important;
  animation: app-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes app-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
  50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

/* ---- Result Panel ---- */
.app-result-panel {
  margin-top: 12px; padding: 14px 16px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px;
}
.app-result-header {
  font: 600 13px/1 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--primary); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .5px;
}
.app-result-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.app-result-chip {
  display: inline-block; padding: 4px 12px;
  background: var(--primary); color: #fff;
  border-radius: 6px;
  font: 600 15px/1.4 'IBM Plex Mono', monospace;
  user-select: all; /* allow manual selection */
}
.app-btn-copy {
  background: var(--primary) !important; color: #fff !important;
  border: none; padding: 8px 16px; border-radius: 8px;
  cursor: pointer; font: 500 13px/1 'IBM Plex Sans', system-ui, sans-serif;
  transition: opacity .2s;
}
.app-btn-copy:hover { opacity: .85; }
.app-btn-copy:disabled { opacity: .6; cursor: default; }

/* ---- New Chat Button (in sidebar) ---- */
.app-sidebar-newchat {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 4px;
}

/* ---- Header Quota (compact) ---- */
.app-header-quota {
  display: flex; align-items: center; gap: 8px;
}
.app-header-quota-label {
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--muted);
  white-space: nowrap;
}
.app-header-quota-bar {
  width: 48px; height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.app-header-quota-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.3s;
}
@media (max-width: 480px) {
  .app-header-quota-bar { display: none; }
}

/* ---- Profile Page ---- */
.profile-container {
  max-width: 640px; margin: 24px auto; padding: 0 20px;
}
.profile-card {
  background: var(--surface); border: 1px solid var(--border, #dde3df);
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}
.profile-card h2 {
  font: 600 17px/1.3 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--ink); margin-bottom: 16px;
}
.profile-hint {
  font: 400 13px/1.5 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--muted); margin-bottom: 16px;
}
.profile-field {
  margin-bottom: 14px;
}
.profile-field label {
  display: block; font: 500 13px/1 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--muted); margin-bottom: 6px;
}
.profile-input {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border, #dde3df);
  font: 400 15px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--ink); background: var(--surface);
  transition: border-color .2s;
}
.profile-input:focus {
  border-color: var(--primary); outline: none;
  box-shadow: 0 0 0 3px rgba(20,83,45,.1);
}
.profile-input:disabled {
  background: #f5f5f5; color: var(--muted); cursor: not-allowed;
}
select.profile-input { cursor: pointer; }
.profile-row {
  display: flex; gap: 12px;
}
.profile-value {
  font: 600 15px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--ink);
}
.profile-actions {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 40px;
}
.profile-save-status {
  font: 500 14px/1 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--ok);
}

/* ---- Follow-up Questions (Rückfragen-Karussell) ---- */
.app-followup-container {
  margin-top: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.app-followup-card {
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 0.3s, background 0.3s;
}
.app-followup-card.app-followup-answered {
  background: #f0fdf4;
  border-color: #bbf7d0;
  opacity: 0.85;
}
.app-followup-label {
  font: 600 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  margin-bottom: 10px;
}
.app-followup-choices {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.app-followup-btn {
  padding: 8px 18px;
  border: 1.5px solid #818cf8;
  border-radius: 20px;
  background: #fff;
  color: #3730a3;
  font: 500 14px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.app-followup-btn:hover {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}
.app-followup-btn:disabled {
  opacity: 0.5; cursor: default;
  transform: none; box-shadow: none;
}
.app-followup-input-row {
  display: flex; gap: 8px; align-items: center;
}
.app-followup-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid #c7d2fe;
  border-radius: 10px;
  font: 400 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b; background: #fff;
  outline: none; transition: border-color 0.2s;
}
.app-followup-input:focus { border-color: #4f46e5; }
.app-followup-input:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.app-followup-submit {
  width: 40px; height: 40px;
  border: none; border-radius: 10px;
  background: #4f46e5; color: #fff;
  font-size: 18px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.app-followup-submit:hover { background: #3730a3; }
.app-followup-submit:disabled { opacity: 0.5; cursor: default; }
.app-followup-answer-badge {
  margin-top: 8px;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #16a34a;
  display: flex; align-items: center; gap: 4px;
}
@media (max-width: 480px) {
  .app-followup-choices { flex-direction: column; }
  .app-followup-btn { width: 100%; text-align: center; }
}
