/* Ratgeberseiten – Gestaltung angelehnt an die Hauptseite (Tailwind gray/blue-800) */
:root {
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --accent: #1e40af;
  --accent-soft: #eff6ff;
  --footer: #edf4f7;
  --radius: 4px;
  --wrap: 72rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #172554; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
h1 { font-size: clamp(1.9rem, 6vw, 3.6rem); font-weight: 300; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 600; margin: 3rem 0 1rem; scroll-margin-top: 6rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .5rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
li { margin: .35rem 0; }
strong { color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--accent); margin: 0 0 .75rem; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 50; background: #fff; padding: .5rem 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.5rem; border: 1px solid transparent; border-radius: var(--radius); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); color: var(--ink); }
.btn-small { min-height: 40px; padding: .5rem 1rem; font-size: .65rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; }
.header-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.header-nav a { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 860px) { .header-nav { display: none; } .header-inner .btn { margin-left: auto; } }
@media (max-width: 420px) { .header-inner { gap: .75rem; } .brand { letter-spacing: .12em; font-size: .72rem; } .header-inner .btn { padding: .5rem .75rem; letter-spacing: .1em; } }

/* Breadcrumb */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; padding: 0; margin: 1.5rem auto 0; font-size: .8rem; color: var(--muted); }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: #9ca3af; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 3rem; align-items: center; padding-top: 2rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.lead { font-size: 1.15rem; color: var(--text); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.hero-media { margin: 0; }
.hero-media img { border-radius: var(--radius); aspect-ratio: 1 / 1; object-fit: cover; }
.byline { font-size: .82rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 2rem; } .hero-media { order: -1; } .hero-media img { aspect-ratio: 16 / 9; } }

/* Layout */
.layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 4rem; padding-top: 1rem; padding-bottom: 4rem; }
.sidebar { position: sticky; top: 6rem; align-self: start; padding-top: 2.5rem; }
.content { max-width: 46rem; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .sidebar { position: static; } }
.sidebar, .content { min-width: 0; }

.facts { border: 1px solid var(--line); background: var(--soft); padding: 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.facts dl { margin: 0; }
.facts div { padding: .5rem 0; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .1rem 0 0; font-size: .9rem; color: var(--ink); line-height: 1.45; }
.toc ol { list-style: none; padding: 0; margin: 0; font-size: .88rem; line-height: 1.4; }
.toc li { margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .4rem 0 .4rem .85rem; color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 1000px) { .toc { display: none; } }

/* Inhaltsbausteine */
.content h2:first-child { margin-top: 2.5rem; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.callout-warn { border-color: #b45309; background: #fffbeb; }
.callout-title { font-weight: 700; color: var(--ink); margin-bottom: .35rem; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
caption { caption-side: bottom; text-align: left; font-size: .78rem; color: var(--muted); padding: .6rem .9rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; color: var(--ink); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.steps { list-style: none; counter-reset: step; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1rem 3rem; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; font-weight: 700; display: grid; place-items: center; }
.steps strong, .steps span { display: block; }

/* Rechner */
.calc-section { margin-top: 3.5rem; padding: 1.75rem; border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); }
.calc-section h2 { margin-top: 0; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.calc label { display: grid; gap: .35rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.calc select, .calc input[type="number"] { font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 400; padding: .7rem .8rem; border: 1px solid #d1d5db; border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
.calc .calc-check { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .9rem; }
.calc .calc-check[hidden] { display: none; }
.calc-result { grid-column: 1 / -1; display: grid; gap: .15rem; padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.calc-year { font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.calc-month, .calc-note { font-size: .88rem; color: var(--muted); }
.calc .btn { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) { .calc { grid-template-columns: 1fr; } .calc .btn { justify-self: stretch; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; padding-right: 2rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -.1rem; font-size: 1.4rem; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-top: .6rem; }

/* Weiterlesen */
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.related li { margin: 0; }
.related a { display: grid; gap: .3rem; height: 100%; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s; }
.related a:hover { border-color: var(--accent); }
.related .eyebrow { margin: 0; }
.related strong { font-size: 1.02rem; }
.related a > span:last-child { font-size: .88rem; line-height: 1.5; }

.cta-band { margin-top: 3.5rem; padding: 2rem; background: var(--ink); color: #d1d5db; border-radius: var(--radius); }
.cta-band h2 { color: #fff; margin-top: 0; }

/* Footer */
.site-footer { background: var(--footer); color: #334155; font-size: .9rem; line-height: 1.6; padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 1fr; gap: 2rem; }
.footer-brand { font-size: .8rem; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .3rem 0; overflow-wrap: anywhere; }
.site-footer a { color: #334155; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .btn-outline { color: var(--ink); }
.site-footer .btn-outline:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #cbd5e1; font-size: .78rem; color: #64748b; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } body { font-size: 16px; } }
