@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fraunces-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
}

:root {
  --paper: #e6eaef;
  --paper-deep: #d5dce4;
  --panel: #f5f7f9;
  --ink: #1b2430;
  --muted: #4e5966;
  --line: #c5cdd6;
  --accent: #1a5a4e;
  --accent-deep: #123f37;
  --accent-soft: #dce8e5;
  --copper: var(--accent);
  --copper-deep: var(--accent-deep);
  --copper-soft: var(--accent-soft);
  --slate: #3d4854;
  --grant: #1a5a4e;
  --eligible: #9aa3ad;
  --own: #4a5560;
  --warn-bg: #ece8e0;
  --warn-ink: #4a3b28;
  --ok-bg: #e4eeeb;
  --shadow: 0 1px 1px rgba(27, 36, 48, 0.05), 0 18px 36px rgba(27, 36, 48, 0.08);
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Times New Roman", Times, serif;
  --header-h: 4.25rem;
  --space: 1.15rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1000px 480px at 8% -16%, rgba(26, 90, 78, 0.07), transparent 58%),
    var(--paper);
  font-optical-sizing: auto;
}
a { color: var(--copper-deep); }
a:hover { color: var(--ink); }
img, svg { display: block; max-width: 100%; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--panel); padding: 0.6rem 1rem; z-index: 20;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 8;
  background: rgba(230, 234, 239, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(212, 205, 194, 0.8);
}
.header-inner, .wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.wordmark {
  display: flex; align-items: center; gap: 0.7rem;
  color: inherit; text-decoration: none;
}
.wordmark .mark { width: 1.85rem; height: 1.85rem; color: var(--ink); flex: none; }
.wordmark .name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.wordmark .sub {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
  margin-top: 0.12rem;
}
.nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; }
.nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 0;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); }

/* Hero */
.hero { padding: 2.4rem 0 1.2rem; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 0.85rem;
  max-width: 22ch;
}
.lede {
  font-size: 1.12rem;
  color: var(--slate);
  max-width: 40rem;
  margin: 0 0 1.6rem;
}
.hero-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 1.6rem; }
  .result-card { position: sticky; top: calc(var(--header-h) + 1rem); }
}

/* Cards / forms */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.35rem;
}
.progress-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem;
}
.progress-label { font-weight: 600; font-size: 0.95rem; }
.progress-track {
  display: flex; gap: 0.35rem; flex: 1; max-width: 9rem;
}
.progress-track span {
  height: 4px; flex: 1; border-radius: 99px;
  background: var(--paper-deep);
}
.progress-track span.on { background: var(--copper); }
fieldset {
  border: 0; margin: 0; padding: 0;
  display: grid; gap: 0.95rem;
}

/* [hidden] must win over fieldset { display: grid } and similar */
[hidden] { display: none !important; }
legend {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 0;
  margin: 0 0 0.35rem;
}
.hint, .field-hint { color: var(--muted); font-size: 0.9rem; margin: 0; }
label.field { display: block; font-weight: 600; font-size: 0.95rem; }
label.field > span, .field-hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; margin-top: 0.15rem; }
input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 2.85rem;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1.05rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.choice-grid { display: grid; gap: 0.55rem; }
@media (min-width: 560px) {
  .choice-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}
.choice {
  display: flex; align-items: flex-start; gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.3;
}
.choice small { display: block; font-weight: 400; color: var(--muted); }
.choice:hover { border-color: #b9b1a5; }
.choice:has(input:checked) {
  border-color: var(--copper);
  background: var(--copper-soft);
  box-shadow: inset 0 0 0 1px var(--copper);
}
.choice input { margin-top: 0.2rem; accent-color: var(--copper); }
.group-label {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0.4rem 0 0.2rem;
  font-weight: 600;
}
.check {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.35rem 0;
  font-weight: 400;
}
.check input { margin-top: 0.3rem; accent-color: var(--copper); width: 1.15rem; height: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem; }
button, .btn {
  appearance: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  border: 0;
}
button:active, .btn:active { transform: scale(0.97); transition: transform 100ms ease-out; }
.btn-primary, button[type="submit"], #next, #rechnen {
  background: var(--copper);
  color: #fff;
}
.btn-primary:hover, #next:hover, #rechnen:hover, button[type="submit"]:hover {
  background: var(--copper-deep);
}
.btn-ghost, #prev, button[type="reset"] {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn[aria-disabled="true"], .btn-disabled {
  background: var(--paper-deep);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* Result */
.result-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
}
.result-source { font-size: 0.86rem; color: var(--muted); margin: 0 0 1rem; }
.kennzahlen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.kennzahl {
  background: var(--paper);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
}
.kennzahl .label { font-size: 0.78rem; color: var(--muted); }
.kennzahl .value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  min-height: 1.4em;
}
.kennzahl.is-main { grid-column: 1 / -1; background: var(--copper-soft); }
.kennzahl.is-main .value { font-size: 1.7rem; color: var(--copper-deep); }
.bars { display: grid; gap: 0.7rem; margin: 0.2rem 0 1rem; }
.bar-row .bar-meta {
  display: flex; justify-content: space-between; gap: 0.5rem;
  font-size: 0.88rem; margin-bottom: 0.25rem;
}
.bar-track {
  height: 10px; border-radius: 99px; background: var(--paper-deep); overflow: hidden;
}
.bar-fill {
  height: 100%; width: 0%; border-radius: 99px;
  transform-origin: left center;
  transition: width 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.eligible { background: var(--eligible); }
.bar-fill.grant { background: var(--grant); }
.bar-fill.own { background: var(--own); }
.breakdown { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.breakdown th, .breakdown td {
  text-align: left; padding: 0.4rem 0; border-bottom: 1px solid var(--line); vertical-align: top;
}
.breakdown td:last-child, .breakdown th:last-child {
  text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap;
}
.notes {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  margin-top: 0.9rem;
}
.notes ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.mobile-live {
  display: none;
}

/* Sections */
.section { padding: 2.2rem 0 0; }
.section-kicker {
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 0.45rem;
}
.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.8rem;
}
.prose { max-width: 70ch; }
.prose p, .prose li { color: var(--slate); }
.trust-grid {
  display: grid; gap: 0.8rem;
}
@media (min-width: 720px) {
  .trust-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.trust-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
}
.trust-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}
.trust-item p { margin: 0; font-size: 0.92rem; color: var(--slate); }
.fristen {
  border-left: 3px solid var(--copper);
  padding: 0.2rem 0 0.2rem 1rem;
  margin: 1rem 0 0;
}
.quellen { padding-left: 1.15rem; }
.quellen li { margin: 0 0 0.5rem; }

/* FAQ */
.faq { display: grid; gap: 0.55rem; max-width: 46rem; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.15rem 0.2rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 0.85rem 1rem;
  min-height: 2.85rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  float: right;
  width: 0.55rem; height: 0.55rem;
  margin-top: 0.45rem;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 0.65rem; }
.faq .answer { padding: 0 1rem 1rem; color: var(--slate); }

/* CTA */
.cta {
  margin: 2.4rem 0 0;
  padding: 1.4rem 1.3rem;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
}
.cta h2 { font-family: var(--serif); letter-spacing: -0.02em; color: var(--paper); margin: 0 0 0.5rem; }
.cta p { color: #d9d3cb; margin: 0 0 0.9rem; max-width: 38rem; }
.badge-ad {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(243, 234, 219, 0.4);
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  margin-bottom: 0.7rem;
  color: #e8d3c5;
}
.cta .soon {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  background: #2b3238;
  color: #c8c2b8;
  font-weight: 700;
}

/* Footer + subpages */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: 0 0 0.6rem; }
.foot-nav a { color: var(--slate); text-decoration: none; font-weight: 600; }
.legal { max-width: 42rem; padding: 2.4rem 0 3rem; }
.legal h1 {
  font-family: var(--serif);
  letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 1rem;
}

@media (max-width: 899px) {
  .mobile-live {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 7;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.8rem -0.1rem -0.2rem;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 24px rgba(26, 31, 36, 0.08);
  }
  .mobile-live .value { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--copper-deep); }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header, .mobile-live { background: var(--paper); backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .card, .choice, .trust-item, .faq details { border-width: 2px; border-color: var(--ink); }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button:active, .btn:active { transform: none; transition: none; }
  .bar-fill { transition: none !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161c23;
    --paper-deep: #0f1419;
    --panel: #1e262e;
    --ink: #e6eaef;
    --muted: #9aa3ad;
    --line: #3a444e;
    --accent: #7eb3a8;
    --accent-deep: #b7d4ce;
    --accent-soft: #243330;
    --slate: #c5cdd6;
    --grant: #7eb3a8;
    --eligible: #6b7380;
    --own: #9aa3ad;
    --warn-bg: #2a261f;
    --warn-ink: #e2d3bc;
    --ok-bg: #1c2a27;
    --shadow: 0 1px 1px rgba(0,0,0,0.3), 0 18px 36px rgba(0,0,0,0.35);
  }
  body {
    background: var(--paper);
  }
  input[type="number"], input[type="date"], select, textarea, .choice, .kennzahl {
    background: #161c23;
    color: var(--ink);
  }
  .btn-primary, button[type="submit"], #next, #rechnen {
    color: #10221e;
  }
  .cta { background: #10151a; }
  .cta p { color: #c5cdd6; }
  .cta .soon { background: #1e262e; color: #c5cdd6; }
  .mobile-live { background: rgba(30, 38, 46, 0.94); }
  .site-header { background: rgba(22, 28, 35, 0.88); }
}
