/* Rechtsrechner – Stylesheet
   Farben: Gesetzesblau (Tinte), Papier, Schönfelder-Rot nur für Fundstellen. */

@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1b2a4a;
  --ink-soft: #46526b;
  --muted: #667089;
  --paper: #f5f6f2;
  --sheet: #ffffff;
  --field: #eef1f6;
  --rule: #d5d9d0;
  --rule-strong: #b9bfb3;
  --seal: #a3242c;
  --seal-soft: #f7e9e9;
  --warn-bg: #fff5dc;
  --warn-rule: #d9a521;
  --focus: #2f6fd1;

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.1rem);

  --wrap: 1180px;
  --gutter: 16px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--seal); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.005em; }
h1 { font-size: var(--step-4); line-height: 1.1; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- Kopf ---------- */
.site-head { background: var(--sheet); border-bottom: 1px solid var(--rule); position: relative; z-index: 5; }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand-mark { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; color: var(--seal); line-height: 1; transform: translateY(-1px); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.01em; }
.head-nav { display: flex; align-items: center; gap: 1.25rem; }
.head-link { text-decoration: none; font-weight: 500; font-size: var(--step--1); }
.menu { position: static; }
.menu > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: var(--step--1); padding: 0.5rem 0.9rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; display: inline-block; width: 0.45em; height: 0.45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: 0.55em; }
.menu[open] > summary { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--sheet); border-bottom: 1px solid var(--rule);
  padding: 1.5rem max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem 1.5rem;
  box-shadow: 0 12px 24px -16px rgba(27, 42, 74, 0.35);
}
.menu-group-extra { display: none; }
.menu-group-name { font-weight: 600; font-size: var(--step--1); color: var(--muted); margin-bottom: 0.4rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
.menu-group ul { list-style: none; margin: 0; padding: 0; }
.menu-group li { margin: 0.2rem 0; }
.menu-group a { text-decoration: none; }
.menu-group a:hover { text-decoration: underline; }

/* ---------- Brotkrumen ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; margin: 1rem 0 0; font-size: var(--step--1); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--rule-strong); }
.crumbs a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  font: inherit; font-weight: 600; border-radius: var(--radius); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; min-height: 48px; padding: 0.7rem 1.4rem;
}
.btn-primary { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.btn-primary:hover { background: #0f1b33; color: #fff; }
.btn-primary[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-secondary { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule-strong); font-size: var(--step--1); min-height: 44px; }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); font-size: var(--step--1); min-height: 44px; padding: 0.55rem 1rem; text-align: center; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.text-link { font-weight: 600; }

/* ---------- Werkzeugseite: oberer Bereich ---------- */
.tool-top { padding: 1.25rem 0 2.5rem; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.tool-main h1 { max-width: 22ch; margin-top: 0.4rem; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 62ch; }

.calc {
  background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--ink);
  border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem;
}
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.field { grid-column: span 2; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-quarter { grid-column: span 1; }
.field[hidden] { display: none; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; line-height: 1.35; }
.field fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field input[type="text"], .field input[type="date"], .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid transparent; border-bottom: 2px solid var(--ink-soft); border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.7rem 0.8rem; min-height: 48px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field input:focus, .field select:focus { border-bottom-color: var(--focus); background: #fff; outline: 3px solid rgba(47, 111, 209, 0.25); outline-offset: 0; }
.input-unit { position: relative; }
.input-unit .unit { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; pointer-events: none; }
.input-unit input { padding-right: 3.6rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-block; padding: 0.6rem 1rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--sheet); font-size: 0.95rem; line-height: 1.3; min-height: 44px; display: inline-flex; align-items: center; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer; font-weight: 500 !important; }
.check input { width: 22px; height: 22px; margin: 0.1rem 0 0; accent-color: var(--ink); flex: none; }
.help { font-size: var(--step--1); color: var(--muted); margin: 0.35rem 0 0; line-height: 1.45; }
.error { font-size: var(--step--1); color: var(--seal); font-weight: 600; margin: 0.35rem 0 0; }
.has-error input, .has-error select { border-bottom-color: var(--seal); }
.form-error { background: var(--seal-soft); color: var(--seal); padding: 0.75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.calc-privacy { margin: 0; font-size: var(--step--1); color: var(--muted); max-width: 36ch; }

/* ---------- Ergebnis: der „Beleg“ ---------- */
.result-slot { margin-top: 1.5rem; outline: none; }
.result-errors { background: var(--seal-soft); border-left: 4px solid var(--seal); padding: 1rem 1.25rem; border-radius: var(--radius); }
.result-errors ul { margin: 0; padding-left: 1.2rem; }
.beleg { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: 0 1px 0 var(--rule), 0 14px 30px -24px rgba(27, 42, 74, 0.5); }
.beleg-head { padding: 1.5rem 1.5rem 1.25rem; border-bottom: 1px dashed var(--rule-strong); }
.beleg-kind { font-size: var(--step--1); color: var(--muted); margin: 0 0 0.75rem; }
.beleg-main-label { margin: 0; font-weight: 600; color: var(--ink-soft); }
.beleg-main-value { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem); line-height: 1.1; margin: 0.2rem 0 0.3rem; letter-spacing: -0.01em; }
.beleg-main-sub { margin: 0; color: var(--ink-soft); }
.beleg-warn { margin: 1.25rem 1.5rem 0; background: var(--warn-bg); border-left: 4px solid var(--warn-rule); padding: 0.85rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.beleg-warn p { margin: 0; }
.beleg-warn p + p { margin-top: 0.5rem; }
.beleg-rows { width: calc(100% - 3rem); margin: 1rem 1.5rem 0; border-collapse: collapse; font-size: 0.97rem; }
.beleg-rows thead th { font-size: var(--step--1); font-weight: 600; color: var(--muted); text-align: left; padding: 0 0 0.4rem; border-bottom: 1px solid var(--rule); }
.beleg-rows tbody th, .beleg-rows td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.beleg-rows td:nth-child(2) { font-weight: 600; }
.beleg-rows .col-cite { width: 9.5rem; padding-right: 0; padding-left: 0.75rem; border-left: 2px solid var(--seal-soft); font-family: var(--serif); font-size: 0.95rem; }
.beleg-rows td.col-cite a { color: var(--seal); text-decoration: none; white-space: nowrap; }
.beleg-rows td.col-cite a:hover { text-decoration: underline; }
.beleg-rows tr.is-total th, .beleg-rows tr.is-total td { border-bottom: 2px solid var(--ink); font-weight: 700; }
.beleg-subtitle { font-family: var(--serif); font-weight: 600; font-size: var(--step-1); margin: 0 0 0.6rem; }
.beleg-table-wrap, .beleg-notes, .beleg-sources, .beleg-letter { padding: 1.25rem 1.5rem 0; }
.beleg-table-wrap { overflow-x: auto; }
.beleg-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 460px; }
.beleg-table th, .beleg-table td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.beleg-table thead th { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.beleg-table tbody th { font-weight: 600; }
.beleg-notes ul { margin: 0; padding-left: 1.2rem; }
.beleg-notes li { margin-bottom: 0.45rem; }
.beleg-sources ol { margin: 0; padding-left: 1.4rem; font-size: var(--step--1); }
.beleg-sources li { margin-bottom: 0.3rem; }
.beleg-sources li::marker { color: var(--seal); font-family: var(--serif); }
.beleg-letter textarea { width: 100%; font: 0.95rem/1.55 var(--sans); color: var(--ink); background: var(--field); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem; resize: vertical; margin-bottom: 0.75rem; }
.beleg-foot { margin-top: 1.25rem; padding: 1.25rem 1.5rem 1.5rem; background: var(--paper); border-top: 1px solid var(--rule); border-radius: 0 0 var(--radius) var(--radius); }
.disclaimer { font-size: var(--step--1); color: var(--ink-soft); }
.beleg-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Seitenleiste ---------- */
.tool-aside { display: grid; gap: 1.25rem; position: sticky; top: 1rem; }
.facts { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; }
.facts-title, .lawyer-title { font-size: var(--step-1); margin-bottom: 0.75rem; }
.facts dl { margin: 0; }
.facts dt { font-size: var(--step--1); color: var(--muted); font-weight: 600; margin-top: 0.85rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.15rem 0 0; font-size: 0.95rem; }
.cite { display: inline-block; font-family: var(--serif); color: var(--seal); text-decoration: none; margin-right: 0.6rem; white-space: nowrap; }
.cite:hover { text-decoration: underline; }
.needs { margin: 0; padding-left: 1.1rem; }
.lawyer { border: 1px solid var(--ink); border-radius: var(--radius); padding: 1.25rem; background: var(--sheet); }
.lawyer p { font-size: 0.95rem; }
.notice-box { border: 1px solid var(--warn-rule); border-left-width: 4px; background: var(--warn-bg); border-radius: var(--radius); padding: 1.25rem; }
.notice-box p { font-size: 0.95rem; }
.notice-box a { font-weight: 600; }
.lawyer-note { font-size: var(--step--1) !important; color: var(--muted); margin: 0; }

/* ---------- Bänder (Abschnitte) ---------- */
.band { padding: 3rem 0; border-top: 1px solid var(--rule); }
.band-teaser { background: var(--sheet); }
.band-method { background: var(--sheet); }
.prose { max-width: 70ch; }
.prose p, .prose li { line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 0.5rem 0.75rem 0.5rem 0; text-align: left; vertical-align: top; }
.prose thead th { color: var(--muted); font-size: var(--step--1); }
.prose h3 { font-size: var(--step-1); margin-top: 1.5rem; }
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.example { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; }
.example h3 { font-size: 1.15rem; }

/* Ratgeber mit Inhaltsverzeichnis und Aufklappen */
.guide-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; align-items: start; }
.guide-toc { position: sticky; top: 1rem; font-size: var(--step--1); }
.toc-title { font-weight: 600; color: var(--muted); margin-bottom: 0.5rem; }
.guide-toc ol { margin: 0; padding-left: 1.2rem; }
.guide-toc li { margin-bottom: 0.45rem; line-height: 1.4; }
.guide-toc a { text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.guide-section h3 { font-size: var(--step-2); margin-top: 2rem; scroll-margin-top: 1rem; }
.guide-section:first-child h3 { margin-top: 0; }
.is-collapsible.is-collapsed { max-height: 34rem; overflow: hidden; position: relative; }
.is-collapsible.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9rem; background: linear-gradient(rgba(245, 246, 242, 0), var(--paper)); }
.guide-toggle { margin-top: 1rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2.5rem 1rem 0; font-weight: 600; position: relative; line-height: 1.45; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.75rem; font-family: var(--serif); font-size: 1.6rem; color: var(--seal); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1rem; max-width: 70ch; margin: 0; }

.source-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.source-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; font-size: 0.95rem; }
.source-label { font-family: var(--serif); color: var(--seal); }

.tool-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.tool-list a { display: flex; flex-direction: column; padding: 1rem 1.1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; height: 100%; }
.tool-list a:hover { border-color: var(--ink); color: var(--ink); }
.tl-name { font-weight: 600; }
.tl-cat { font-size: var(--step--1); color: var(--muted); }

/* ---------- Startseite ---------- */
.home-hero { padding: 3rem 0 3.5rem; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.hero-text h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.hero-sample { margin: 0; }
.sample-slip { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 1.5rem; transform: rotate(-1.2deg); box-shadow: 0 18px 30px -24px rgba(27, 42, 74, 0.6); }
.sample-kind { font-size: var(--step--1); color: var(--muted); margin-bottom: 0.25rem; }
.sample-value { font-family: var(--serif); font-weight: 600; font-size: 2.6rem; line-height: 1.1; margin-bottom: 0.75rem; }
.sample-slip table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.sample-slip th, .sample-slip td { text-align: left; padding: 0.45rem 0.5rem 0.45rem 0; border-top: 1px solid var(--rule); font-weight: 400; }
.sample-slip td:nth-child(2) { font-weight: 600; }
.sample-cite { font-family: var(--serif); color: var(--seal); border-left: 2px solid var(--seal-soft); padding-left: 0.6rem !important; white-space: nowrap; }
.hero-sample figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }

.index-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; margin-top: 1.5rem; }
.index-group h3 { font-size: var(--step-2); margin-bottom: 0.2rem; }
.index-group > p { font-size: var(--step--1); margin-bottom: 0.75rem; }
.question-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.question-list a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.question-list .q { display: block; font-weight: 600; line-height: 1.35; }
.question-list .q-tool { display: block; font-size: var(--step--1); color: var(--seal); font-family: var(--serif); margin-top: 0.15rem; }
.question-list a:hover .q { text-decoration: underline; }
.band-trust { background: var(--ink); color: #fff; border-top: 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.trust-item h3 { color: #fff; }
.trust-item p { color: #d9deea; margin: 0; }

/* ---------- Kategorieseite ---------- */
.cat-top { padding: 1.25rem 0 2.5rem; }
.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.cat-grid h1 { margin-top: 0.4rem; }
.tool-cards { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.tool-card a, .tool-card.is-planned { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.25rem; background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--ink); border-radius: var(--radius); text-decoration: none; }
.tool-card a:hover { border-color: var(--ink); color: var(--ink); }
.tool-card.is-planned { border-top-color: var(--rule-strong); border-style: dashed; color: var(--muted); }
.tc-type { font-size: var(--step--1); color: var(--muted); }
.tc-name { font-family: var(--serif); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
.tc-desc { font-size: 0.95rem; color: var(--ink-soft); }
.tc-cite { margin-top: auto; padding-top: 0.5rem; font-family: var(--serif); color: var(--seal); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Einfache Seiten ---------- */
.page-top { padding: 1.25rem 0 4rem; }
.page-top h1 { margin-top: 0.4rem; }
.page-prose h2 { font-size: var(--step-2); margin-top: 2rem; }

/* ---------- Fuß ---------- */
.site-foot { background: var(--sheet); border-top: 1px solid var(--rule); padding: 3rem 0 2rem; margin-top: 0; font-size: var(--step--1); }
.foot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem; }
.foot-head { font-weight: 600; margin-bottom: 0.4rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 0.25rem 0; }
.foot-grid a, .foot-legal a { text-decoration: none; color: var(--ink-soft); }
.foot-grid a:hover, .foot-legal a:hover { text-decoration: underline; color: var(--ink); }
.foot-note { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); color: var(--ink-soft); }
.foot-note p { max-width: 80ch; }
.foot-legal { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0; margin: 0; }

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .menu-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .head-nav { gap: 0.9rem; }
}
@media (max-width: 860px) {
  .head-link { display: none; }
  .menu-group-extra { display: block; }
}
@media (max-width: 640px) {
  .menu-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 75vh; overflow-y: auto; }
}
@media (max-width: 1000px) {
  .tool-grid, .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .guide-toc { position: static; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; }
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .examples { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --step-3: 1.6rem; --step-2: 1.3rem; }
  body { font-size: 1rem; }
  .head-link { display: none; }
  .menu-group-extra { display: block; }
  .brand-name { font-size: 1.15rem; }
  .tool-top { padding-top: 0.75rem; }
  .lede { font-size: 1.08rem; }
  .calc { padding: 1.1rem; margin-left: calc(-1 * var(--gutter) / 2); margin-right: calc(-1 * var(--gutter) / 2); }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .field, .field-full { grid-column: 1 / -1; }
  .field-quarter { grid-column: span 1; }
  .btn-primary { width: 100%; }
  .beleg-head, .beleg-foot { padding-left: 1.1rem; padding-right: 1.1rem; }
  .beleg-warn { margin-left: 1.1rem; margin-right: 1.1rem; }
  .beleg-rows { width: calc(100% - 2.2rem); margin-left: 1.1rem; margin-right: 1.1rem; }
  .beleg-rows thead { display: none; }
  .beleg-rows tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--rule); padding: 0.55rem 0; }
  .beleg-rows tbody th, .beleg-rows td { border: 0; padding: 0; }
  .beleg-rows td:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .beleg-rows .col-cite { width: auto; border-left: 0; padding-left: 0.75rem; text-align: right; font-size: 0.85rem; }
  .beleg-rows tr.is-total { border-bottom: 2px solid var(--ink); }
  .beleg-rows tr.is-total th, .beleg-rows tr.is-total td { border: 0; }
  .beleg-table-wrap, .beleg-notes, .beleg-sources, .beleg-letter { padding-left: 1.1rem; padding-right: 1.1rem; }
  .index-grid, .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-list li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .band { padding: 2.25rem 0; }
  .sample-slip { transform: none; }
}

/* ---------- Druck: nur das Ergebnis ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-head, .site-foot, .crumbs, .calc, .tool-aside, .band, .beleg-actions, .skip, .tool-main h1 + .lede { display: none !important; }
  .tool-grid { display: block; }
  .tool-main h1 { font-size: 18pt; }
  .beleg { box-shadow: none; border: 1px solid #999; }
  .beleg-rows td.col-cite a::after { content: ""; }
  a { color: #000; }
}

/* Kanzleimarketing-Seite */
.promo { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.75rem; margin: 2rem 0; }
.promo h2 { color: #fff; margin-top: 0 !important; }
.promo p { color: #d9deea; }
.promo .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.promo .btn-primary:hover { background: var(--paper); color: var(--ink); }
.promo .promo-note { font-size: var(--step--1); margin: 0.9rem 0 0; color: #b9c2d6; }
.check-list { list-style: none; padding: 0 !important; }
.check-list li { padding-left: 1.6rem; position: relative; }
.check-list li::before { content: "§"; position: absolute; left: 0; top: 0; font-family: var(--serif); color: var(--seal); font-weight: 700; }

/* ---- Cookiefrei: Fußzeile und Hinweis unten ---- */
.foot-privacy { margin: 1rem 0 0; font-size: var(--step--1); color: inherit; opacity: .9; max-width: 70ch; }
.foot-privacy a { color: inherit; }
.cf-badge { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%; background: #2e7d4f; color: #fff; font-size: .8em; font-weight: 700; vertical-align: .05em; }
.cookiefree { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #fff; border-top: 3px solid #2e7d4f; box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
.cf-toggle { position: absolute; opacity: 0; pointer-events: none; }
.cf-toggle:checked + .cookiefree { display: none; }
.cookiefree-inner { display: flex; gap: 1rem; align-items: center; padding-top: .75rem; padding-bottom: .75rem; }
.cookiefree p { margin: 0; font-size: var(--step--1); line-height: 1.45; }
.cookiefree a { color: #fff; }
.cookiefree .cf-btn { flex: none; text-align: center; user-select: none; font: inherit; font-weight: 600; font-size: var(--step--1); background: #fff; color: var(--ink); border: 0; border-radius: var(--radius); padding: .55rem 1rem; cursor: pointer; }
.cookiefree .cf-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) {
  .cookiefree-inner { flex-direction: column; align-items: stretch; gap: .6rem; }
  .cookiefree .cf-btn { width: 100%; }
}
@media print { .cookiefree { display: none !important; } }

/* ---- Werbeplatz (Anzeige) ---- */
.cat-aside { display: grid; gap: 1.25rem; align-content: start; }
.ad-slot { display: block; }
.ad-label { display: block; font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem; }
.ad-link { display: block; line-height: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 var(--rule); }
.ad-link img { display: block; width: 100%; height: auto; }
.ad-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Breite Bildschirme: fest im linken Rand, immer sichtbar */
@media (min-width: 1680px) and (min-height: 820px) {
  .ad-slot {
    --railw: min(300px, calc((100vw - var(--wrap)) / 2 - 56px));
    position: fixed; z-index: 20; top: 132px;
    left: calc((100vw - var(--wrap)) / 2 - var(--railw) - 28px);
    width: var(--railw);
  }
}
@media print { .ad-slot { display: none !important; } }

/* ---- Seite Werbung ---- */
.ad-example { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.25rem; align-items: start; margin: 1rem 0 1.5rem; }
.ad-example img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 1px 0 var(--rule); }
.ad-example figcaption { grid-column: 1 / -1; font-size: var(--step--1); color: var(--muted); }
.price-table td.price { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.prose .price-table { display: table; }
.city-cols { columns: 3 14rem; column-gap: 2rem; padding-left: 1.1rem; }
.city-cols li { break-inside: avoid; }
@media (max-width: 640px) { .ad-example { grid-template-columns: 1fr; } .ad-example img:first-child { max-width: 220px; } }

/* ---- Kopfzeile: Werbung hervorheben ---- */
.head-link-cta { border: 1px solid var(--seal); color: var(--seal); border-radius: var(--radius); padding: .35rem .7rem; }
.head-link-cta:hover { background: var(--seal); color: #fff; }

/* ---- Nach-oben-Knopf ---- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px rgba(27, 42, 74, .28);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s, bottom .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--seal); }
.to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 640px) { .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; } }
@media print { .to-top { display: none !important; } }

/* ---- Grenzen des Rechners ---- */
.beleg-limits { padding: 1rem 1.5rem 0; font-size: 0.92rem; }
.beleg-limits ul { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.beleg-limits li { margin: .15rem 0; }
.band-limits .limits-list { padding-left: 1.2rem; }
.band-limits .limits-list li { margin: .3rem 0; }
.band-limits .notice-box { margin-top: 1.25rem; }
@media (max-width: 640px) { .beleg-limits { padding-left: 1.1rem; padding-right: 1.1rem; } }
