@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-display: swap;
  src: url(fonts/IBMPlexSans-Regular.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-display: swap;
  src: url(fonts/IBMPlexSans-Medium.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-display: swap;
  src: url(fonts/IBMPlexSans-SemiBold.woff2) format('woff2');
}

/* Farben wie in der App (app/lib/ui/theme.dart). */
:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #16202b;
  --muted: #5c6b7a;
  --rule: #e6e4de;
  --rule-strong: #d2cfc7;
  --debit: #8c2f39;
  --credit: #1f5c3f;
  --agent: #3b4cca;
  --agent-surface: #f2f3fb;
  --selection: #edeae2;
  --sans: 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181c;
    --surface: #1a1f24;
    --ink: #e4e7e5;
    --muted: #8c9aa6;
    --rule: #242a30;
    --rule-strong: #333b43;
    --debit: #d98a90;
    --credit: #7fb99b;
    --agent: #8e9bff;
    --agent-surface: #1c2333;
    --selection: #20262c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
a:hover { text-decoration-color: currentColor; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Kopf */
header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; padding-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; font-size: 18px; }
.brand img { width: 30px; height: 30px; }
.top nav { display: flex; gap: 24px; font-size: 15px; color: var(--muted); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* Einstieg */
.hero { padding-top: 56px; padding-bottom: 40px; }
.eyebrow {
  margin: 0 0 18px; font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--muted);
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 600;
  margin: 0 0 24px; max-width: 14ch;
}
.hero h1 span { color: var(--muted); }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 40ch; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  padding: 13px 20px; border-radius: 10px; text-decoration: none; font-weight: 500;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn[aria-disabled="true"] { cursor: default; }
.cta small { color: var(--muted); font-size: 14px; }

/* Nachgebautes App-Fenster */
.window {
  margin: 56px 0 0;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(22, 32, 43, 0.25);
  overflow: hidden;
  font-size: 13.5px; line-height: 1.45;
}
.window .bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.window .bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--rule-strong); }
.panes { display: grid; grid-template-columns: 190px 1fr 320px; min-height: 380px; }
.pane { padding: 16px; border-right: 1px solid var(--rule); }
.pane:last-child { border-right: 0; }
.pane h4 { margin: 0 0 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.acct { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 6px; }
.acct.on { background: var(--selection); }
.acct span:last-child { color: var(--muted); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger td { padding: 7px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ledger td:nth-child(2) { color: var(--muted); padding-left: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 100%; }
.ledger td:last-child { text-align: right; padding-left: 12px; }
.minus { color: var(--debit); }
.plus { color: var(--credit); }
.chat { background: var(--agent-surface); display: flex; flex-direction: column; gap: 12px; }
.q { align-self: flex-end; background: var(--surface); border: 1px solid var(--rule); padding: 8px 12px; border-radius: 12px 12px 3px 12px; }
.a { color: var(--ink); }
.a table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.a td { padding: 4px 0; border-bottom: 1px solid var(--rule); }
.a td:last-child { text-align: right; }
.a tr.sum td { border-bottom: 0; font-weight: 600; }
.by { margin-top: auto; font-size: 11px; color: var(--muted); }

/* Abschnitte */
section { padding: 88px 0 0; }
section > .wrap > h2, .legal h1 {
  font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.02em;
  font-weight: 600; margin: 0 0 16px; max-width: 22ch;
}
section .intro { color: var(--muted); max-width: 56ch; margin: 0 0 40px; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.grid > div { padding: 24px 24px 0 0; }
.grid > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.grid h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.grid p { margin: 0; color: var(--muted); font-size: 16px; }

.questions { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.questions li { padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 20px; display: flex; gap: 20px; align-items: baseline; }
.questions li span { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 2ch; }

.private {
  background: var(--ink); color: var(--paper);
  border-radius: 16px; padding: 48px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
}
.private h2 { margin: 0 0 16px; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.private p { margin: 0; opacity: 0.75; }
.private ul { list-style: none; margin: 0; padding: 0; }
.private li { padding: 12px 0; border-bottom: 1px solid rgba(251, 250, 247, 0.16); }
.private li:last-child { border-bottom: 0; }
@media (prefers-color-scheme: dark) {
  .private { background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); }
  .private li { border-color: var(--rule); }
}

details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 500; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--muted); font-family: var(--mono); }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); margin: 10px 0 0; max-width: 64ch; }

/* Fuss */
footer {
  margin-top: 104px; padding: 32px 0 48px; border-top: 1px solid var(--rule);
  font-size: 14px; color: var(--muted);
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; gap: 20px; }
.publisher { letter-spacing: 0.04em; }
.publisher b { font-weight: 600; color: var(--ink); }

/* Rechtstexte */
.legal { max-width: 720px; padding-top: 32px; }
.legal .stand { color: var(--muted); margin: 0 0 40px; }
.legal h2 { font-size: 20px; font-weight: 600; margin: 40px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 20px; }
.legal address { font-style: normal; }

@media (max-width: 900px) {
  .panes { grid-template-columns: 1fr 280px; }
  .panes .accounts { display: none; }
  .private { grid-template-columns: 1fr; padding: 32px; gap: 24px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top nav a.hide-sm { display: none; }
  .hero { padding-top: 24px; }
  .hero p.lead { font-size: 18px; }
  .panes { grid-template-columns: 1fr; }
  .panes .ledger-pane { display: none; }
  .grid { grid-template-columns: 1fr; }
  .grid > div, .grid > div + div { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .questions li { font-size: 17px; }
  section { padding-top: 64px; }
  .private { padding: 24px; border-radius: 12px; }
}
