@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #f6f3ea;
  --surface: #fffdf8;
  --surface-2: #efeadc;
  --ink: #15211d;
  --muted: #5a6761;
  --line: #ddd6c4;
  --accent: #0f5c4f;
  --accent-ink: #f6f3ea;
  --accent-soft: #d8e9e2;
  --result-bg: #103f37;
  --result-ink: #f4f1e6;
  --result-muted: #b5cbc3;
  --result-line: rgba(255, 255, 255, .16);
  --tax: #e2794f;
  --social: #e6b34c;
  --health: #8db8d6;
  --pension: #b49ad8;
  --net: #68d0a9;
  --warn-bg: #fbeed2;
  --warn-ink: #6a4806;
  --warn-line: #e6c784;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(21, 33, 29, .05), 0 12px 32px -18px rgba(21, 33, 29, .22);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1614; --surface: #17201d; --surface-2: #202b27; --ink: #edeade; --muted: #a0ada7; --line: #2d3a35;
    --accent: #66cdaa; --accent-ink: #0c1a16; --accent-soft: #1f3a32; --result-bg: #143b33;
    --warn-bg: #33290f; --warn-ink: #f0d596; --warn-line: #5c4a1d; --shadow: 0 12px 32px -18px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1614; --surface: #17201d; --surface-2: #202b27; --ink: #edeade; --muted: #a0ada7; --line: #2d3a35;
  --accent: #66cdaa; --accent-ink: #0c1a16; --accent-soft: #1f3a32; --result-bg: #143b33;
  --warn-bg: #33290f; --warn-ink: #f0d596; --warn-line: #5c4a1d; --shadow: 0 12px 32px -18px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Inter", system-ui, sans-serif; font-feature-settings: "cv11", "ss03"; }
h1, h2, h3 { font-family: "Bricolage", "Inter", sans-serif; line-height: 1.12; margin: 0; letter-spacing: -.015em; text-wrap: balance; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { top: 10px; }
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

/* Kopf */
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 18px "Bricolage", sans-serif; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { background: var(--surface-2); }

.hero { padding-block: 22px 30px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font: 650 .9rem/1.55 "Inter", system-ui, sans-serif; letter-spacing: normal; text-wrap: wrap; }
.hero__claim { font-size: clamp(2.1rem, 5.6vw, 4rem); font-weight: 700; max-width: 17ch; }
.lede { max-width: 62ch; margin: 18px 0 14px; font-size: clamp(1.03rem, 1.6vw, 1.18rem); color: var(--muted); }
.trust { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: .9rem; color: var(--muted); }
.trust svg { color: var(--accent); flex: none; margin-top: 3px; }

/* Rechner */
.calc { display: grid; gap: 22px; align-items: start; padding-bottom: 22px; }
@media (min-width: 980px) { .calc { grid-template-columns: minmax(0, 1fr) minmax(370px, 430px); gap: 28px; } }
.calc__form { display: grid; gap: 16px; min-width: 0; }
/* Mitlaufendes Ergebnis ohne eigene Scrollleiste; ui.js passt top an, wenn es höher als das Fenster ist */
@media (min-width: 980px) { .calc__result { position: sticky; top: 14px; } }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .card { padding: 24px; } }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.28rem; margin-bottom: 18px; }
.step { display: inline-grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 .85rem "Inter", sans-serif; letter-spacing: 0; }

.grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid--spaced { margin-top: 16px; }
.grid--spaced:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card > .field { margin-top: 16px; }
.field__label { font-weight: 600; font-size: .9rem; }
.help { color: var(--muted); font-size: .82rem; line-height: 1.42; margin: 0; }
.help--plain { font-size: .95rem; }
.card > .help { margin-top: 12px; }
.input { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input input { flex: 1; min-width: 0; width: 100%; min-height: 44px; border: 0; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; font-weight: 550; padding: 8px 12px; outline: none; }
.input__unit { padding-right: 12px; color: var(--muted); font-size: .88rem; white-space: nowrap; }
select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--bg); color: inherit; font: inherit; font-weight: 550; padding: 8px 10px; }
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .94rem; font-weight: 550; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.check--field { align-self: end; padding-block: 11px; }

/* Segment-Auswahl */
.seg { display: grid; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.seg--2 { grid-template-columns: repeat(2, 1fr); }
.seg--3 { grid-template-columns: repeat(var(--seg-n, 3), minmax(0, 1fr)); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; height: 100%; padding: 6px; text-align: center; border-radius: 9px; font-size: .88rem; font-weight: 600; line-height: 1.18; color: var(--muted); transition: background .15s, color .15s; }
.seg small { font-weight: 550; font-size: .72rem; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .13); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }
.year-switch { max-width: 300px; }
.sv-erklaerung { margin-top: 4px; }
.status-line { margin: 10px 0 0; font-size: .9rem; }
.status-line strong { color: var(--accent); }

.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.more > summary { cursor: pointer; font-weight: 600; font-size: .93rem; color: var(--accent); min-height: 30px; }
.more > .grid { margin-top: 12px; }
.more > .help { margin-top: 12px; }

.notice { border-radius: 10px; padding: 11px 14px; font-size: .9rem; }
.notice--warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.notice--card { margin: 0 0 16px; }

/* Ergebnis */
.result { background: var(--result-bg); color: var(--result-ink); padding: 20px 22px; border-radius: var(--radius); }
.result a { color: inherit; }
.result__kicker { margin: 0; font-weight: 600; color: var(--result-muted); font-size: .93rem; }
.result__big { margin: 2px 0 2px; font: 700 clamp(2.5rem, 7vw, 3.4rem)/1.08 "Bricolage", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.result__sub { margin: 0; font-size: .84rem; color: var(--result-muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; padding-block: 12px; border-block: 1px solid var(--result-line); }
.stats dt { font-size: .74rem; color: var(--result-muted); }
.stats dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; font-size: .98rem; white-space: nowrap; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(0, 0, 0, .2); border-radius: 11px; margin-bottom: 14px; }
.tabs button { min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--result-muted); font: 600 .87rem "Inter", sans-serif; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--result-ink); color: var(--result-bg); }
.tabs button:focus-visible, .result summary:focus-visible, .result a:focus-visible { outline: 3px solid var(--net); }

.fall { display: grid; gap: 5px; margin-bottom: 16px; }
.fall__row { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 8px; font-size: .74rem; color: var(--result-muted); }
.fall__track { position: relative; height: 15px; background: rgba(255, 255, 255, .06); border-radius: 3px; }
.fall__bar { position: absolute; top: 0; bottom: 0; min-width: 2px; border-radius: 3px; transition: left .25s, width .25s; }

.rows { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.rows td { padding: 6px 0; border-bottom: 1px solid var(--result-line); vertical-align: top; }
.rows td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-weight: 550; }
.rows tr.sum td { font-weight: 700; border-bottom: 0; padding-top: 10px; font-size: 1rem; }
.rows tr.sub td { color: var(--result-muted); font-size: .84rem; }
.rows--small { font-size: .84rem; margin-top: 10px; }
.rows__title { font-size: .95rem; margin: 18px 0 6px; }
.more--flush { border-top-color: var(--result-line); }
.more--flush > summary { color: var(--result-ink); }
.disclaimer { margin-bottom: 32px; padding: 14px 18px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 12px; font-size: .9rem; line-height: 1.5; }
.disclaimer p { margin: 0; }
.disclaimer a { color: inherit; font-weight: 650; }
.legal a { color: inherit; }

/* Rechtlicher Hinweis vor dem Formular */
.legal { display: flex; gap: 10px; margin-bottom: 22px; padding: 14px 16px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; }
.legal__icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.legal__body { min-width: 0; font-size: .86rem; line-height: 1.5; }
.legal h2 { font: 600 .92rem/1.4 "Inter", sans-serif; letter-spacing: 0; color: var(--ink); margin-bottom: 4px; }
.legal p { margin: 0; max-width: 90ch; }
.legal ul { margin: 6px 0; padding-left: 18px; max-width: 90ch; }
.legal li + li { margin-top: 2px; }
.notes__link { margin: 14px 0 0; max-width: 860px; font-size: .92rem; color: var(--muted); }
.notes__link a { font-weight: 650; }

/* Hinweise */
.notes { padding-bottom: 36px; }
.notes h2, .why h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 16px; }
.notes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 860px; }
.notes__list li { display: grid; gap: 3px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; font-size: .94rem; }
.notes__list b { font-size: .75rem; color: var(--muted); letter-spacing: .02em; }
.notes__list li.warnung { border-left-color: #c9852a; }
.notes__list li.tipp { border-left-color: #2e8fb0; }
.notes__list li.annahme { border-left-color: var(--muted); }

.why { padding-bottom: 20px; }
.ratgeber .prose { padding-block: 20px 56px; }
.ratgeber .prose > h2:first-child { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-top: 0; }
.ratgeber h3 { font-size: 1.06rem; margin: 22px 0 6px; }
.ratgeber .toc { margin-block: 18px 8px; }
.ratgeber table { margin-block: 12px; }
.ratgeber .prose td, .ratgeber .prose th { overflow-wrap: normal; hyphens: manual; }
.ratgeber .prose td:first-child, .ratgeber .prose th:first-child { width: auto; }
@media (max-width: 559px) {
  .ratgeber thead { display: none; }
  .ratgeber table, .ratgeber tbody { display: block; }
  .ratgeber tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ratgeber .prose td { display: block; padding: 2px 0; border: 0; }
  .ratgeber .prose td:first-child { font-weight: 650; }
  .ratgeber td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
.ratgeber__cta { margin-top: 26px; }
.ratgeber__cta a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 650; text-decoration: none; }
.why__grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .why__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.why article { border-top: 2px solid var(--ink); padding-top: 12px; }
.why h3 { font-size: 1.14rem; margin-bottom: 8px; }
.why p { margin: 0; color: var(--muted); font-size: .94rem; }

/* Mobile Ergebnisleiste */
.mobilebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--result-bg); color: var(--result-ink); box-shadow: 0 -6px 22px rgba(0, 0, 0, .25); }
.mobilebar span { display: block; font-size: .72rem; color: var(--result-muted); }
.mobilebar strong { font: 700 1.3rem "Bricolage", sans-serif; font-variant-numeric: tabular-nums; }
.mobilebar a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 9px; background: var(--result-ink); color: var(--result-bg); font-weight: 650; text-decoration: none; }
@media (min-width: 980px) { .mobilebar { display: none; } }
@media (max-width: 979px) { body.has-mobilebar { padding-bottom: 74px; } }

/* Fuß und Textseiten */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 26px; padding-block: 22px; font-size: .88rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: inherit; }
.prose { max-width: 760px; padding-block: 18px 60px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 18px; }
.prose h2 { font-size: 1.35rem; margin: 34px 0 10px; scroll-margin-top: 16px; }
.prose .legal { margin: 0 0 22px; }
.prose .legal h2 { margin: 0 0 8px; }
.prose .legal p, .prose .legal li { color: inherit; }
.prose .legal h2 { font-size: .92rem; }
.toc { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .94rem; }
.toc ol { margin: 6px 0 0; padding-left: 22px; }
.stand { color: var(--muted); font-size: .9rem; }
.prose p, .prose li { color: var(--ink); }
.prose table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .92rem; margin-block: 8px; }
.prose th, .prose td { overflow-wrap: anywhere; hyphens: auto; }
.prose th:first-child, .prose td:first-child { width: 36%; }
.prose th, .prose td { text-align: left; padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.placeholder { background: var(--warn-bg); color: var(--warn-ink); padding: 0 4px; border-radius: 4px; }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.prose .linklike { color: var(--accent); }
.prose code { font-size: .9em; }

/* Cookie-Banner: Akzeptieren vollfarbig, Ablehnen umrandet, beide gleich groß */
.consent { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; max-width: 520px; margin-inline: auto; padding: 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px -12px rgba(0, 0, 0, .4); font-size: .88rem; line-height: 1.48; }
@media (min-width: 720px) { .consent { left: 24px; right: auto; bottom: 24px; width: 520px; } }
.consent p { margin: 0; }
.consent__titel { font: 700 1.05rem/1.3 "Bricolage", sans-serif; margin-bottom: 6px !important; }
.consent__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.consent__knoepfe button { min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--accent); border-radius: 10px; font: 650 .94rem "Inter", sans-serif; cursor: pointer; }
.consent__akzeptieren { background: var(--accent); color: var(--accent-ink); }
.consent__akzeptieren:hover { filter: brightness(1.12); }
.consent__ablehnen { background: transparent; color: var(--accent); }
.consent__ablehnen:hover { background: var(--accent-soft); }
@media print { .consent { display: none; } .site-header, .site-footer, .mobilebar, .theme-toggle, .why { display: none; } .calc__result { position: static; max-height: none; } }
