:root {
    --red: #d8232a;
    --ink: #1a1a1c;
    --muted: #6b6f76;
    --line: #e6e7ea;
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --card: #ffffff;
    --header-bg: rgba(255,255,255,0.8);
    --shadow: 0 30px 70px -30px rgba(20,22,28,.35);
    --radius: 16px;
    --max: 1280px;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Inter", "Segoe UI", sans-serif;
  }
  :root[data-theme="dark"] {
    --red: #ff4d54;
    --ink: #f2f3f5;
    --muted: #9aa0a8;
    --line: #2c2e33;
    --bg: #0e0f12;
    --bg-soft: #16181c;
    --card: #17191e;
    --header-bg: rgba(14,15,18,0.7);
    --shadow: 0 30px 70px -30px rgba(0,0,0,.7);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --red: #ff4d54;
      --ink: #f2f3f5;
      --muted: #9aa0a8;
      --line: #2c2e33;
      --bg: #0e0f12;
      --bg-soft: #16181c;
      --card: #17191e;
      --header-bg: rgba(14,15,18,0.7);
      --shadow: 0 30px 70px -30px rgba(0,0,0,.7);
    }
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
  }
  a { color: inherit; text-decoration: none; }
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
  .accent { color: var(--red); }

  /* Nav */
  header {
    position: sticky; top: 0; z-index: 10;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    transition: background .25s ease, border-color .25s ease;
  }
  nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
  .logo { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; display: block; flex-shrink: 0; }
  .logo svg, .logo img { width: 100%; height: 100%; display: block; }
  .nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
  .nav-links a:hover { color: var(--ink); }
  .btn {
    display: inline-block; background: var(--red); color: #fff;
    padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
    transition: transform .15s ease, opacity .15s ease;
  }
  .btn:hover { transform: translateY(-1px); opacity: .92; }
  .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

  /* Hero */
  .hero { padding: 88px 0 64px; text-align: center; }
  .pill {
    display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--red);
    background: rgba(216,35,42,.08); padding: 5px 13px; border-radius: 999px; margin-bottom: 22px;
  }
  h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
  .hero p.lead { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); max-width: 760px; margin: 22px auto 30px; }
  .no-break { white-space: nowrap; }
  .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
  .hint { font-size: 12.5px; color: var(--muted); margin-top: 16px; }

  /* Mockup */
  .mock { margin: 56px auto 0; max-width: 880px; }
  .window {
    border-radius: 14px; border: 1px solid var(--line); overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--card);
    text-align: left;
  }
  .titlebar { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
  .dot { display: block; flex: 0 0 11px; width: 11px; height: 11px; border-radius: 50%; }
  .dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
  .titlebar > span:not(.dot) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); font-weight: 600; }
  .app-body { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 0; align-items: stretch; }

  /* Sidebar */
  .ui-side { padding: 15px; background: var(--bg-soft); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
  .ui-seg { display: flex; gap: 3px; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 3px; }
  .ui-seg span { flex: 1; text-align: center; font-size: 10px; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 6px; }
  .ui-seg span.on { background: var(--red); color: #fff; }
  .ui-card { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; }
  .ui-card .k { font-size: 8.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  .ui-card .v { font-size: 11.5px; font-weight: 600; margin-top: 3px; }
  .ui-card .v small { display: block; font-weight: 500; font-size: 10px; color: var(--muted); margin-top: 1px; }

  /* Preview */
  .ui-preview { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
  .ui-prevhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .ui-prevhead .t { font-size: 12.5px; font-weight: 700; }
  .ui-prevhead .m { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
  .ui-prevhead .nav { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
  .ui-prevhead .nav b { width: 19px; height: 19px; border: 1px solid var(--line); border-radius: 5px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
  .ui-prevhead .nav .c { font-size: 9.5px; color: var(--muted); font-weight: 600; }
  .page { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; box-shadow: 0 8px 22px -12px rgba(0,0,0,.3); }
  .ui-valid { display: flex; align-items: center; gap: 10px; margin-top: auto; border: 1px solid rgba(40,180,70,.45); background: rgba(40,180,70,.08); border-radius: 9px; padding: 9px 11px; }
  .ui-valid .vt { font-size: 11px; font-weight: 700; }
  .ui-valid .vs { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
  .ui-valid .exp { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 600; padding: 7px 14px; border-radius: 8px; white-space: nowrap; }

  /* Echte QR-Rechnung (PDF-Export als SVG) */
  .billimg { display: block; width: 100%; height: auto; }

  /* Sections */
  section { padding: 76px 0; }
  .section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
  .section-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.02em; font-weight: 800; }
  .section-head p { color: var(--muted); margin-top: 12px; font-size: 16px; }
  .soft { background: var(--bg-soft); }

  .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
  .card .ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(216,35,42,.08); display: grid; place-items: center; margin-bottom: 16px; }
  .card .ico svg { width: 21px; height: 21px; stroke: var(--red); }
  .card h3 { font-size: 17px; letter-spacing: -0.01em; }
  .card p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
  /* Steps */
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
  .step { text-align: left; }
  .step .n { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red); display: grid; place-items: center; font-weight: 700; margin-bottom: 14px; }
  .step h3 { font-size: 17px; }
  .step p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

  /* Pricing */
  .price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
  .price { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--card); display: flex; flex-direction: column; }
  .price ul { flex: 1; }
  .price.pro { border-color: var(--red); position: relative; }
  .price.pro::after { content: "Empfohlen"; position: absolute; top: -11px; right: 22px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; }
  .price h3 { font-size: 18px; }
  .price .amt { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 2px; }
  .price .per { color: var(--muted); font-size: 12.5px; min-height: 32px; }
  .price .suffix { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
  .price ul { list-style: none; margin: 18px 0 22px; }
  .price li { font-size: 13px; padding: 6px 0; display: flex; gap: 9px; align-items: flex-start; }
  .price li svg { width: 17px; height: 17px; stroke: var(--red); flex-shrink: 0; margin-top: 3px; }
  .feature-list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .feature-list summary {
    width: fit-content;
    cursor: pointer;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    padding: 9px 13px;
    list-style: none;
  }
  .feature-list summary::-webkit-details-marker { display: none; }
  .feature-list summary::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
  }
  .feature-list[open] summary::after {
    transform: translateY(1px) rotate(225deg);
  }
  .feature-list summary:hover { background: var(--bg-soft); }
  .compare {
    margin-top: 12px;
    align-self: stretch;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
  }
  .compare-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.8fr) minmax(86px, .55fr) minmax(86px, .55fr);
    border-bottom: 1px solid var(--line);
  }
  .compare-row:last-child { border-bottom: 0; }
  .compare-cell {
    padding: 10px 14px;
    border-right: 1px solid var(--line);
    font-size: 13.5px;
  }
  .compare-cell:last-child { border-right: 0; }
  .compare-head .compare-cell {
    background: var(--bg-soft);
    font-weight: 750;
  }
  .compare-mark {
    text-align: center;
    font-weight: 800;
    color: #1ea34a;
  }
  .compare-head .compare-mark {
    color: var(--ink);
  }
  .compare-mark.no { color: var(--red); }

  /* Footer */
  footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 13px; }
  .foot-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 18px 28px; }
  .foot-main { display: flex; flex-direction: column; gap: 9px; }
  .footer-brand { font-size: 14px; }
  .footer-logo { width: 22px; height: 22px; }
  .made-line { display: flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: 5px; }
  .heart-icon, .swiss-icon { display: block; }
  .foot-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; }
  .foot-links a { color: var(--muted); }
  .foot-links a:hover { color: var(--ink); }

  /* Theme toggle */
  .theme-toggle {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
    background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
    transition: background .15s ease, border-color .15s ease;
  }
  .theme-toggle:hover { background: var(--bg-soft); }
  .theme-toggle svg { width: 17px; height: 17px; }
  .theme-toggle .moon { display: none; }
  :root[data-theme="dark"] .theme-toggle .sun { display: none; }
  :root[data-theme="dark"] .theme-toggle .moon { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  }
  .nav-actions { display: flex; align-items: center; gap: 12px; }
  .nav-actions > .btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 750;
    white-space: nowrap;
  }
  .language-menu { position: relative; }
  .language-menu summary { width: 42px; height: 34px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
  .language-menu summary::-webkit-details-marker { display: none; }
  .language-menu summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-1px) rotate(45deg); opacity: .65; }
  .language-menu summary:hover { background: var(--bg-soft); }
  .language-options { position: absolute; top: calc(100% + 8px); right: 0; min-width: 132px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); z-index: 20; }
  .language-menu:not([open]) .language-options { display: none; }
  .language-options a { display: block; padding: 7px 9px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
  .language-options a:hover, .language-options a.active { color: #fff; background: var(--red); }

  /* App Store badge */
  .appstore {
    display: inline-flex; align-items: center; gap: 11px;
    background: var(--ink); color: var(--bg);
    padding: 9px 18px 9px 16px; border-radius: 11px;
    transition: transform .15s ease, opacity .15s ease;
  }
  .appstore:hover { transform: translateY(-1px); opacity: .9; }
  .appstore svg { width: 26px; height: 26px; }
  .appstore .t { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
  .appstore .t small { font-size: 10px; opacity: .8; }
  .appstore .t b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

  /* Screenshots */
  .shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .shot {
    border-radius: 14px; border: 1px solid var(--line); overflow: hidden;
    background: var(--card); box-shadow: var(--shadow);
  }
  .shot-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
  }
  .shot-open:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--red) 70%, transparent);
    outline-offset: -3px;
  }
  .shot img { display: block; width: 100%; height: auto; }
  .shot figcaption {
    border-top: 1px solid var(--line);
    padding: 10px 13px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
  }
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, .78);
  }
  .lightbox[hidden] { display: none; }
  .lightbox-frame {
    width: min(1440px, 96vw);
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
  }
  .lightbox-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 116px);
    object-fit: contain;
    background: #090909;
  }
  .lightbox-frame figcaption {
    padding: 11px 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
  }
  .lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    background: rgba(16, 16, 18, .82);
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
  }
  .lightbox-close:hover { background: rgba(35, 35, 38, .92); }

  @media (max-width: 980px) {
    .price-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 760px) {
    .nav-links { display: none; }
    .app-body { grid-template-columns: 1fr; }
    .ui-side { border-right: none; border-bottom: 1px solid var(--line); }
    .grid, .steps, .shots { grid-template-columns: 1fr; }
    .price-grid { grid-template-columns: 1fr; }
  }

  /* Legal */
  .legal-page { padding: 84px 0 92px; }
  .legal-wrap { max-width: 780px; }
  .eyebrow { color: var(--red); font-size: 13px; font-weight: 750; margin-bottom: 10px; }
  .legal-page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 42px; }
  .legal-block { border-top: 1px solid var(--line); padding: 28px 0; }
  .legal-block h2 { font-size: 17px; margin-bottom: 10px; }
  .legal-block p { color: var(--muted); font-size: 15px; margin-top: 8px; }
  .legal-block strong { color: var(--ink); }
  .legal-block a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--red) 60%, transparent); text-underline-offset: 3px; }
  .muted { color: var(--muted); }
