/* ───────── Designsystem Klarvorsorge ─────────
   Marine (Vertrauen) · Weiß · Grautöne · Akzent Grün (Handlung) · Info Blau
   Kein Build-Schritt nötig. Farben für Text erfüllen WCAG AA. */
:root {
  --navy-950: #071426; --navy-900: #0b1f3a; --navy-800: #142c4f; --navy-700: #1e3d66; --navy-100: #e6ecf4; --navy-50: #f3f6fa;
  --ink: #0f1b2d; --muted: #4a5a70; --line: #dde3eb; --surface: #f6f8fb;
  --accent-700: #0a6b4f; --accent-600: #0d8462; --accent-500: #10a37a; --accent-50: #e8f6f1;
  --info-600: #1f5fbf; --info-50: #eaf1fc; --warn-700: #8a5a00; --warn-50: #fff6e0; --danger-600: #b42318;
  --radius: 14px; --radius-s: 12px;
  --shadow: 0 1px 2px rgb(11 31 58 / .06), 0 4px 16px rgb(11 31 58 / .06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; display: flex; flex-direction: column; min-height: 100dvh; }
main { flex: 1; }
h1, h2, h3 { color: var(--navy-900); letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); line-height: 1.15; font-weight: 650; }
h2 { font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.3; font-weight: 650; }
h3 { font-size: 1.125rem; font-weight: 650; }
.h-sm { font-size: 1.25rem; } .h-xs { font-size: 1rem; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--info-600); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--info-600); outline-offset: 2px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
.muted { color: var(--muted); } .small { font-size: .875rem; } .d-block { display: block; }
.c-accent { color: var(--accent-700); }
.narrow { max-width: 40rem; margin: 0 auto; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 60; background: #fff; padding: .75rem; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 2.5rem; }
.stack > * + * { margin-top: 1.25rem; }
.grid-2 { display: grid; gap: 1rem; } .grid-3 { display: grid; gap: 1rem; } .grid-4 { display: grid; gap: .75rem; }
.gap-s { gap: .75rem 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--navy-900); color: #fff; border-bottom: 1px solid var(--navy-800); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 650; font-size: 1.125rem; }
.nav-desktop { display: none; gap: .25rem; }
.nav-desktop a { color: #fff; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; font-size: .9375rem; font-weight: 500; }
.nav-desktop a:hover, .nav-desktop a.active { background: var(--navy-800); }
.nav-toggle { background: none; border: 0; color: #fff; padding: .5rem; cursor: pointer; }
.nav-mobile { border-top: 1px solid var(--navy-800); padding: .5rem 0; }
.nav-mobile a { display: block; color: #fff; text-decoration: none; padding: .75rem .5rem; border-radius: 8px; }
@media (min-width: 768px) { .nav-desktop { display: flex; } .nav-toggle, .nav-mobile { display: none !important; } }

/* Sektionen */
.sec { padding: 3rem 0; } @media (min-width: 640px) { .sec { padding: 4rem 0; } }
.sec-tight { padding: 1.5rem 0 !important; }
.sec-surface { background: var(--surface); } .sec-navy { background: var(--navy-900); color: #fff; }
.sec-intro { margin-top: .5rem; max-width: 42rem; color: var(--muted); }
.eyebrow { font-size: .875rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-700); margin-bottom: .5rem; }
.eyebrow-light { color: var(--accent-500); }

/* Hero */
.hero { background: var(--navy-900); color: #fff; padding: 1.5rem 0 2.5rem; }
@media (min-width: 640px) { .hero { padding-bottom: 3.5rem; } }
.hero h1 { color: #fff; }
.hero-intro { margin-top: 1rem; max-width: 36rem; font-size: 1.125rem; line-height: 1.6; color: var(--navy-100); }
.hero-grid { margin-top: 1.5rem; display: grid; gap: 2rem; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.hero-aside { color: var(--ink); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .375rem; font-size: .875rem; color: rgb(230 236 244 / .85); }
.crumbs li + li::before { content: "›"; margin-right: .375rem; }
.crumbs a { color: inherit; text-decoration: none; } .crumbs a:hover { color: #fff; }
.tiles { display: grid; gap: .75rem; } @media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { display: block; border: 1px solid var(--navy-700); background: var(--navy-800); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: #fff; transition: border-color .15s; }
.tile:hover { border-color: var(--accent-500); }
.tile strong { font-size: 1.125rem; display: block; } .tile span { display: block; margin-top: .25rem; color: var(--navy-100); font-size: .875rem; }
.tile em { display: block; margin-top: .75rem; font-style: normal; color: var(--accent-500); font-weight: 650; font-size: .875rem; }

/* Karten, Hinweise */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
@media (min-width: 640px) { .card { padding: 1.5rem; } }
a.card { display: block; text-decoration: none; color: inherit; } a.card:hover { border-color: var(--navy-700); }
.notice { border: 1px solid rgb(31 95 191 / .25); background: var(--info-50); border-radius: var(--radius-s); padding: 1rem; font-size: .9375rem; line-height: 1.6; }
.notice-warn { border-color: rgb(138 90 0 / .3); background: var(--warn-50); }
.notice-demo { border: 1px dashed var(--warn-700); background: var(--warn-50); }
.notice-title { display: block; color: var(--navy-900); margin-bottom: .25rem; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .125rem .625rem; font-size: .75rem; font-weight: 650; background: var(--navy-50); color: var(--navy-800); }
.badge-demo { border: 1px dashed var(--warn-700); background: var(--warn-50); color: var(--warn-700); }
.badge-ok { background: var(--accent-50); color: var(--accent-700); }
.badge-info { background: var(--info-50); color: var(--info-600); }
.answer { border-left: 4px solid var(--accent-600); background: var(--accent-50); border-radius: var(--radius); padding: 1.25rem; }
.answer h2 { font-size: 1.25rem; } .answer p { margin-top: .5rem; font-size: 1.0625rem; line-height: 1.65; }
.prose { max-width: 48rem; font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 1rem; } .prose h2 { padding-top: 1.5rem; } .prose ul { padding-left: 1.25rem; } .prose li + li { margin-top: .375rem; }
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; font-size: .875rem; }
.trust li { display: flex; gap: .5rem; } .trust li::before { content: "●"; color: var(--accent-600); }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.checks { list-style: none; padding: 0; margin: .75rem 0 0; } .checks li { display: flex; gap: .5rem; } .checks li + li { margin-top: .5rem; }
.checks span { color: var(--accent-600); } .checks-neutral span { color: var(--muted); }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq details + details { border-top: 1px solid var(--line); } .faq details { padding: 1.25rem; }
.faq summary { list-style: none; cursor: pointer; font-weight: 650; color: var(--navy-900); display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { font-size: 1.25rem; color: var(--muted); transition: transform .15s; } .faq details[open] summary span { transform: rotate(45deg); }
.faq p { margin-top: .75rem; line-height: 1.65; }
.sources { padding: 0; list-style: none; font-size: .875rem; margin: .75rem 0 0; } .sources li + li { margin-top: .5rem; }
.author { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; font-size: .875rem; }
@media (min-width: 640px) { .author { grid-template-columns: repeat(3, auto); justify-content: start; gap: 2.5rem; } }
.author strong { color: var(--navy-900); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: 0 1.25rem; border-radius: var(--radius-s); font: inherit; font-size: 1rem; font-weight: 650; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s; text-align: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent-600); color: #fff; } .btn-primary:hover { background: var(--accent-700); }
.btn-secondary { background: #fff; color: var(--navy-900); border-color: var(--navy-900); } .btn-secondary:hover { background: var(--navy-50); }
.btn-ghost { background: transparent; color: var(--navy-900); } .btn-ghost:hover { background: var(--navy-50); }
.btn-block { width: 100%; }

/* Formulare */
.field { border: 0; padding: 0; min-width: 0; }
:where(fieldset.field) { margin: 0; }
.field > label, .field > legend { display: block; margin-bottom: .375rem; font-size: .875rem; font-weight: 550; padding: 0; }
.input { display: block; width: 100%; min-height: 3rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; padding: 0 1rem; font: inherit; font-size: 1rem; color: var(--ink); }
.input:focus { outline: none; border-color: var(--info-600); box-shadow: 0 0 0 3px rgb(31 95 191 / .18); }
textarea.input { padding: .75rem 1rem; }
.input[aria-invalid="true"] { border-color: var(--danger-600); }
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%234a5a70' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center; padding-right: 2.5rem; }
.input-wrap { position: relative; } .input-wrap .input { padding-right: 3.5rem; }
.unit { position: absolute; inset: 0 1rem 0 auto; display: flex; align-items: center; color: var(--muted); pointer-events: none; }
.help { margin-top: .25rem; font-size: .875rem; color: var(--muted); } .help:empty { display: none; }
.error { margin-top: .25rem; font-size: .875rem; font-weight: 550; color: var(--danger-600); }
.form-error { margin-top: 1rem; background: rgb(180 35 24 / .08); color: var(--danger-600); padding: .75rem; border-radius: var(--radius-s); font-weight: 550; font-size: .875rem; }
.seg-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; color: var(--navy-900); font-weight: 650; font-size: .875rem; cursor: pointer; }
.seg-opt input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--info-600); outline-offset: 2px; }
.toggle { display: flex; align-items: flex-start; gap: .75rem; font-size: .875rem; line-height: 1.4; cursor: pointer; }
.toggle input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; flex-shrink: 0; accent-color: var(--accent-600); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { background: var(--surface); border-radius: var(--radius-s); padding: 1rem; }

/* Lead-Formular */
.leadform > * + * { margin-top: 1.25rem; }
.lf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.lf-count { font-size: .875rem; }
.progress { height: 6px; border-radius: 99px; background: var(--navy-100); margin-top: .75rem !important; }
.progress div { height: 100%; border-radius: 99px; background: var(--accent-600); transition: width .25s; }
.lf-step { border: 0; padding: 0; min-width: 0; }
:where(.lf-step) { margin: 0; } .lf-step > * + * { margin-top: 1.25rem; }
.lf-legend { padding: 0; font-weight: 650; color: var(--muted); margin-bottom: .25rem; }
.lf-actions { display: flex; flex-direction: column-reverse; gap: .75rem; }
.lf-actions .btn-primary { width: 100%; }
@media (min-width: 640px) { .lf-actions { flex-direction: row; justify-content: space-between; } .lf-actions .btn-primary { width: auto; margin-left: auto; } }

/* Rechner */
.calc { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .calc { grid-template-columns: 360px 1fr; } .calc-inputs { position: sticky; top: 5rem; align-self: start; } }
.calc-inputs > * + * { margin-top: 1.25rem; }
.calc-out > * + * { margin-top: 1.5rem; }
.stat { background: var(--surface); border-radius: var(--radius-s); padding: 1rem; }
.stat .l { font-size: .875rem; color: var(--muted); } .stat .v { margin-top: .25rem; font-size: 1.5rem; font-weight: 650; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.stat .s { margin-top: .125rem; font-size: .75rem; color: var(--muted); }
.stat-strong { background: var(--navy-900); } .stat-strong .l, .stat-strong .s { color: var(--navy-100); } .stat-strong .v { color: #fff; }
.tarif-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.tarif-preis { text-align: right; } .tarif-preis .v { font-size: 1.5rem; font-weight: 650; color: var(--navy-900); }
.kv { display: grid; gap: .25rem 1.5rem; margin: 1rem 0 0; font-size: .875rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .375rem 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; text-align: right; }
@media (min-width: 640px) { .kv { grid-template-columns: 1fr 1fr; } .kv div { display: block; border: 0; padding: 0; } .kv dd { text-align: left; } }
.tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.tabs button { flex-shrink: 0; min-height: 2.75rem; padding: 0 1rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: #fff; color: var(--navy-900); font: inherit; font-weight: 650; font-size: .875rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.pkg { display: grid; gap: .75rem; } @media (min-width: 640px) { .pkg { grid-template-columns: repeat(3, 1fr); } }
.pkg button { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: var(--radius); padding: 1rem; cursor: pointer; font: inherit; color: inherit; }
.pkg button[aria-checked="true"] { border-color: var(--accent-600); background: var(--accent-50); }
.pkg strong { display: block; color: var(--navy-900); } .pkg span { display: block; font-size: .875rem; color: var(--muted); margin-top: .25rem; } .pkg em { display: block; font-style: normal; font-size: .875rem; font-weight: 550; margin-top: .5rem; }
.bstein { display: flex; gap: 1rem; } .bstein.off { opacity: .7; }
.bstein input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex-shrink: 0; accent-color: var(--accent-600); }
.bstein h3 { font-size: 1rem; display: inline; margin-right: .5rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; font-variant-numeric: tabular-nums; }
.table th { background: var(--surface); border-bottom: 1px solid var(--line); padding: .625rem .75rem; font-weight: 650; color: var(--navy-900); }
.table td { border-bottom: 1px solid var(--line); padding: .625rem .75rem; vertical-align: top; }
.table .hl td { background: var(--accent-50); font-weight: 650; }
.table .neg { color: var(--danger-600); }
.scroll-y { max-height: 24rem; overflow: auto; } .scroll-y thead th { position: sticky; top: 0; }

/* Suche */
.search { position: relative; } .search label { color: #fff; }
.search ul { position: absolute; z-index: 20; left: 0; right: 0; margin: .5rem 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 8px 24px rgb(11 31 58 / .15); overflow: hidden; }
.search li a { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; color: var(--ink); text-decoration: none; }
.search li a span { font-size: .75rem; color: var(--muted); } .search li[aria-selected="true"] a, .search li a:hover { background: var(--navy-50); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.chips a { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: .375rem .875rem; font-size: .875rem; font-weight: 550; color: var(--navy-900); text-decoration: none; background: #fff; }

/* Sticky CTA & Consent */
.sticky-cta { position: fixed; inset: auto 0 0 0; z-index: 30; padding: .75rem; background: rgb(255 255 255 / .96); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .2s; }
.sticky-cta.show { transform: none; }
@media (min-width: 768px) { .sticky-cta { display: none; } }
.consent-banner { position: fixed; z-index: 50; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--line); padding: 1rem; box-shadow: 0 -8px 24px rgb(11 31 58 / .12); }
.consent-banner > * + * { margin-top: .75rem; }
.consent-details { background: var(--surface); padding: .75rem; border-radius: var(--radius-s); } .consent-details > * + * { margin-top: .5rem; }
@media (min-width: 640px) { .consent-banner { inset: auto 1rem 1rem auto; max-width: 28rem; border: 1px solid var(--line); border-radius: 16px; } }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 2.5rem 0 6rem; font-size: .875rem; color: var(--muted); }
@media (min-width: 768px) { .site-footer { padding-bottom: 2.5rem; } }
.footer-grid { display: grid; gap: 2rem; } @media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer strong { color: var(--navy-900); } .site-footer p { margin-top: .5rem; line-height: 1.6; }
.site-footer ul { list-style: none; padding: 0; margin: .5rem 0 0; } .site-footer li + li { margin-top: .375rem; } .site-footer a { color: inherit; }

/* Admin */
.admin-bar { background: var(--navy-950); color: #fff; } .admin-bar .header-row { height: 3.5rem; }
.admin-bar nav { display: flex; gap: .25rem; overflow-x: auto; } .admin-bar a { color: #fff; text-decoration: none; padding: .375rem .75rem; border-radius: 8px; font-size: .875rem; }
.admin-bar a:hover { background: var(--navy-800); }
.admin-main { background: var(--surface); padding: 2rem 0; flex: 1; }
.kpis { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); } @media (min-width: 1024px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 1rem; } .kpi .l { font-size: .75rem; color: var(--muted); } .kpi .v { font-size: 1.25rem; font-weight: 650; color: var(--navy-900); margin-top: .25rem; }
.pills { display: flex; gap: .5rem; } .pills a { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .375rem .75rem; font-size: .875rem; text-decoration: none; color: var(--ink); }
.pills a.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: .875rem; margin: .5rem 0 0; } .dl dt { color: var(--muted); } .dl dd { margin: 0; word-break: break-word; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
