/* ===== Farben & Grundwerte ===== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #0e1525;
  --muted: #5a6478;
  --border: #e2e6ef;
  --primary: #0ea371;
  --primary-strong: #0b8a5f;
  --primary-soft: #e3f7ef;
  --accent: #5b5bf0;
  --hero-1: #0b1220;
  --hero-2: #12243f;
  --shadow: 0 10px 30px rgba(14, 21, 37, 0.08);
  --radius: 18px;
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1a;
    --surface: #111827;
    --surface-2: #172033;
    --text: #e8ecf4;
    --muted: #9aa4b8;
    --border: #233049;
    --primary: #22c58b;
    --primary-strong: #34d399;
    --primary-soft: #0f2a22;
    --accent: #8b8bff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-strong); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ===== Header / Navigation ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 800; letter-spacing: 0.02em;
}
.menu { display: flex; align-items: center; gap: 6px; }
.menu a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.menu a:hover { color: var(--text); background: var(--surface-2); }
.menu a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.menu a.btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; transition: 0.2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .menu.open { display: flex; }
  .menu a { padding: 12px 14px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; text-decoration: none; font-weight: 700;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.btn-small { padding: 9px 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(91, 91, 240, 0.45), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(14, 163, 113, 0.45), transparent 60%),
              linear-gradient(160deg, var(--hero-1), var(--hero-2));
  padding: 96px 0 104px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: #c9d3e6; max-width: 560px; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #7ff0c4; background: rgba(34, 197, 139, 0.12); border: 1px solid rgba(34, 197, 139, 0.35);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 .grad { background: linear-gradient(90deg, #5ff2b8, #a5a5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 24px; padding: 26px; backdrop-filter: blur(6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.hero-card .label { font-size: 0.85rem; color: #a9b6cf; }
.hero-card .big { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-card .row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; color: #c9d3e6; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 14px; }
.hero-card svg { width: 100%; height: auto; margin: 14px 0 4px; }
.hero-card .fine { font-size: 0.75rem; color: #8592ab; margin: 10px 0 0; }

.page-hero { padding: 72px 0 64px; }
.page-hero p.lead { max-width: 680px; }

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ===== Sektionen & Karten ===== */
section.block { padding: 84px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head .kicker { color: var(--primary-strong); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
section.alt .card { background: var(--bg); box-shadow: none; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; transition: transform 0.15s, border-color 0.15s; display: block; }
a.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card .more { color: var(--primary-strong); font-weight: 700; }
.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-soft); font-size: 1.4rem; margin-bottom: 16px;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; margin-bottom: 14px;
}

/* ===== Artikel-Layout (Unterseiten) ===== */
.article { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding: 56px 0 84px; }
.toc { position: sticky; top: 96px; align-self: start; }
.toc strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.toc a { display: block; text-decoration: none; color: var(--muted); padding: 6px 0 6px 14px; border-left: 2px solid var(--border); font-weight: 500; }
.toc a:hover { color: var(--text); border-left-color: var(--primary); }
.prose { min-width: 0; }
.prose section { margin-bottom: 56px; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
@media (max-width: 900px) {
  .article { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .toc strong { width: 100%; }
  .toc a { border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; }
}

.callout {
  border-radius: 14px; padding: 18px 20px; margin: 20px 0;
  background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.callout.warn { background: color-mix(in srgb, #f59e0b 12%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.callout p:last-child { margin-bottom: 0; }

/* 50/30/20 Balken */
.split-bar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; margin: 18px 0 10px; font-weight: 700; color: #fff; }
.split-bar div { display: grid; place-items: center; font-size: 0.95rem; }
.split-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; font-size: 0.92rem; }
@media (max-width: 620px) { .split-legend { grid-template-columns: 1fr; } }

/* Tabelle */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 700; }

/* Checkliste */
.checklist { list-style: none; padding: 0 !important; }
.checklist li { padding-left: 34px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 6px;
  background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 800; display: grid; place-items: center;
}

/* ===== Rechner ===== */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }
.field output { color: var(--primary-strong); font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.result-big { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin: 4px 0 14px; }
.stack-bar { height: 18px; border-radius: 999px; overflow: hidden; display: flex; background: var(--surface-2); margin: 12px 0; }
.stack-bar .paid { background: var(--accent); }
.stack-bar .gain { background: var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.9rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ===== CTA ===== */
.cta {
  border-radius: 28px; padding: 48px; color: #fff; text-align: center;
  background: radial-gradient(600px 300px at 80% 0%, rgba(91, 91, 240, 0.5), transparent 60%),
              linear-gradient(135deg, #0b3d2e, #12243f);
}
.cta p { color: #c9d3e6; max-width: 560px; margin: 0 auto 24px; }
.cta .btn-row { justify-content: center; }
@media (max-width: 620px) { .cta { padding: 32px 22px; } }

/* ===== Über mich ===== */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 4rem; font-weight: 800;
  box-shadow: var(--shadow);
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 280px; } }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-line:last-child { border-bottom: 0; }
.contact-line a { font-weight: 700; text-decoration: none; }

/* Platzhalter, die noch ausgefüllt werden müssen */
mark.todo { background: #fde68a; color: #111; padding: 0 4px; border-radius: 4px; }

/* ===== Footer ===== */
.site-footer { background: var(--hero-1); color: #aab4c8; padding: 56px 0 28px; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 0.95rem; }
.site-footer a { color: #d6deec; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.disclaimer { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 36px; padding-top: 22px; font-size: 0.82rem; color: #8592ab; }

/* Legal-Seiten */
.legal { max-width: 760px; padding: 56px 20px 84px; }
.legal h2 { font-size: 1.35rem; margin-top: 36px; }
