/*
Theme Name:   Onlinescheidung
Theme URI:    https://www.onlinescheidung-vom-fachanwalt.de/
Author:       computento
Description:  Theme für die Online-Scheidung von Rechtsanwalt Stefan Arnst, Fachanwalt für Familienrecht in Düsseldorf. Gestaltung nach Entwurf 1 („Der Kostenrechner“) in den Farben der Kanzlei. Aufgebaut wie das Theme „Arnst“: Startseite über Felder, Innenseiten im Blockeditor, Schriften lokal, keine Verbindung zu Google.
Version:      1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  onlinescheidung
Tags:         one-column, custom-menu, translation-ready, accessibility-ready
*/

/* ============================================================
   ONLINESCHEIDUNG — Gestaltung nach Entwurf 1
   Der Entwurf war grün (#0f5d5a). Hier stehen alle Farben auf dem
   Kanzleiblau von ra-arnst.de: #133370 für Schaltflächen und
   Hervorhebungen, #0d2453 beim Überfahren. Die getönten Flächen und
   Linien sind im selben Farbton nachgezogen, Helligkeit wie im Entwurf.
   Alle Farben laufen über Tokens; keine festen Werte im Rumpf.
   ============================================================ */

/* --- Tokens: Licht (Standard) --------------------------------- */
:root {
  --ground:        #f5f6f9;
  --ground-alt:    #e9edf4;
  --surface:       #ffffff;
  --ink:           #131a28;
  --ink-soft:      #2e3648;
  --muted:         #566074;
  --primary:       #133370;   /* Kanzleiblau, wie ra-arnst.de */
  --primary-hover: #0d2453;
  --primary-tint:  #dfe6f3;
  --on-primary:    #ffffff;
  --rule:          #dbe0ea;
  --rule-strong:   #b4bdcf;
  --rule-input:    #7d879b;   /* Feldränder: mind. 3:1 gegen die Fläche */
  --focus:         #133370;
  --fehler:        #a03521;
  --shadow-sm:     0 1px 2px rgba(19, 26, 40, .06);
  --shadow-lg:     0 2px 4px rgba(19, 26, 40, .05), 0 24px 48px -28px rgba(19, 26, 40, .35);

  --step--1: clamp(.82rem, .8rem + .1vw, .875rem);
  --step-0:  clamp(1rem, .97rem + .16vw, 1.06rem);
  --step-1:  clamp(1.12rem, 1.06rem + .28vw, 1.28rem);
  --step-2:  clamp(1.35rem, 1.22rem + .58vw, 1.72rem);
  --step-3:  clamp(1.7rem, 1.42rem + 1.2vw, 2.5rem);
  --step-4:  clamp(2.2rem, 1.7rem + 2.3vw, 3.6rem);
  --step-num: clamp(2.4rem, 1.7rem + 3.1vw, 4rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --band:   clamp(3.5rem, 7vw, 6rem);
  --radius: 10px;
  --kopfhoehe: 75px;
  --measure: 72ch;
}

/* --- Tokens: Dunkel ------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:        #0e121a;
    --ground-alt:    #12161f;
    --surface:       #1a1f2b;
    --ink:           #e6e9f0;
    --ink-soft:      #ccd2de;
    --muted:         #98a1b5;
    --primary:       #8ba8de;
    --primary-hover: #a6c0ec;
    --primary-tint:  #1b2740;
    --on-primary:    #0b1220;
    --rule:          #262d3b;
    --rule-strong:   #3a4356;
    --rule-input:    #6b7590;
    --focus:         #a6c0ec;
    --fehler:        #f08a72;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
    --shadow-lg:     0 2px 4px rgba(0, 0, 0, .5), 0 24px 48px -28px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --ground:        #0e121a;
  --ground-alt:    #12161f;
  --surface:       #1a1f2b;
  --ink:           #e6e9f0;
  --ink-soft:      #ccd2de;
  --muted:         #98a1b5;
  --primary:       #8ba8de;
  --primary-hover: #a6c0ec;
  --primary-tint:  #1b2740;
  --on-primary:    #0b1220;
  --rule:          #262d3b;
  --rule-strong:   #3a4356;
  --rule-input:    #6b7590;
  --focus:         #a6c0ec;
  --fehler:        #f08a72;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lg:     0 2px 4px rgba(0, 0, 0, .5), 0 24px 48px -28px rgba(0, 0, 0, .8);
}

/* --- Basis ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--kopfhoehe) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: "Public Sans", "Segoe UI", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
/* hidden gilt immer, auch wo eine Klasse display setzt (Antragsschritte, Kinderblöcke). */
[hidden] { display: none !important; }
a { color: var(--primary); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}

h1, h2, h3, .display {
  font-family: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  font-weight: 600; line-height: 1.12; letter-spacing: -.02em;
  text-wrap: balance; color: var(--ink);
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }

.wrap { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--primary);
}
.lede { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.section { padding-block: var(--band); }
.section + .section { border-top: 1px solid var(--rule); }
.section > .wrap { display: flex; flex-direction: column; gap: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head { display: flex; flex-direction: column; gap: .7rem; max-width: 60ch; }
.section-foot { font-size: var(--step--1); color: var(--muted); max-width: 70ch; }

/* --- Schaltflächen ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 50px; padding: .8rem 1.5rem; border-radius: var(--radius);
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.masthead-cta { white-space: nowrap; flex: none; }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); box-shadow: var(--shadow-sm); }
.btn-quiet:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* --- Kopfzeile --------------------------------------------------- */
.topbar {
  background: var(--primary); color: var(--on-primary);
  font-size: var(--step--1);
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: .2rem 1.5rem;
  align-items: center; justify-content: space-between; min-height: 40px; padding-block: .3rem;
}
.topbar a { color: inherit; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.topbar a:hover { text-decoration: underline; }

.masthead { position: sticky; top: 0; z-index: 40; background: var(--ground); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 74px; }

.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
/* Kanzleilogo wie auf ra-arnst.de (419 × 240); die dunkle Fassung nur im
   Dunkelmodus. Ein Strich trennt Logo und Seitennamen. */
.brand .logo, .brand .logo-eigen { height: 56px; width: auto; flex: none; }
.brand .logo-dunkel { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-hell { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dunkel { display: block; }
}
:root[data-theme="dark"] .brand .logo-hell { display: none; }
:root[data-theme="dark"] .brand .logo-dunkel { display: block; }
.brand > span { border-left: 1px solid var(--rule-strong); padding-left: .85rem; min-width: 0; }
@media (max-width: 560px) {
  .brand .logo, .brand .logo-eigen { height: 44px; }
  .brand { gap: .6rem; }
  .brand > span { padding-left: .6rem; }
}
.brand b { font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.2; display: block; }
.brand .brand-zeile { display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; }
.nav a {
  display: block; padding: .5rem .8rem; border-radius: 7px;
  font-weight: 500; font-size: .95rem; color: var(--ink-soft); text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { background: var(--ground-alt); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--primary-tint); }
.nav a.extern::after { content: " ↗"; font-size: .8em; color: var(--muted); }
/* Klappmenüs, falls die Kanzlei Unterpunkte anlegt. */
.nav .has-sub { position: relative; display: flex; align-items: center; }
.nav .sub-toggle {
  width: 28px; height: 28px; border: 0; background: none; cursor: pointer; color: var(--muted);
  border-radius: 6px;
}
.nav .sub-toggle::before { content: "▾"; font-size: .9rem; }
.nav .submenu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 14rem; z-index: 50;
  flex-direction: column; align-items: stretch; padding: .4rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.nav .has-sub[data-open="true"] > .submenu,
.nav .has-sub:hover > .submenu,
.nav .has-sub:focus-within > .submenu { display: flex; }

.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: .5rem;
  min-height: 44px; padding: .5rem .9rem; border-radius: 8px;
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600; font-size: .92rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); cursor: pointer;
}
/* Ab 1180 px passt das Menü mit Marke und Knopf in eine Zeile; darunter
   klappt es ein (gemessen: bei 1100 px brachen Menüpunkte und Knopf um). */
@media (max-width: 1180px) {
  .nav { display: none; order: 3; width: 100%; padding-block: .5rem .75rem; border-top: 1px solid var(--rule); }
  .masthead[data-menu="true"] .nav { display: block; }
  .masthead[data-menu="true"] .wrap { flex-wrap: wrap; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a { padding: .75rem .6rem; }
  .nav .has-sub { flex-wrap: wrap; }
  .nav .submenu { position: static; box-shadow: none; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .masthead-cta { display: none; }
}

/* --- Aufmacher ---------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--band); background: linear-gradient(180deg, var(--ground-alt), var(--ground) 70%); }
.hero .wrap { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); } }

.hero-copy { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 50ch; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .8rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule);
  font-size: var(--step--1); color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.chip svg { width: 14px; height: 14px; flex: none; color: var(--primary); }
.chip a { display: inline-block; padding-block: .15rem; }

.hero-note {
  margin-top: auto; padding: 1.1rem 1.25rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-sm);
  display: grid; gap: .35rem; max-width: 46ch;
}
.hero-note b { font-family: "Familjen Grotesk", sans-serif; font-size: 1rem; }
.hero-note p { font-size: var(--step--1); color: var(--muted); line-height: 1.6; }
.hero-note a { font-weight: 600; }

/* --- Rechnerkarte: das Signaturelement --------------------------- */
.calc {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.calc-head { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--rule); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.calc-head h2 { font-size: var(--step-1); }
.calc-head span { font-size: var(--step--1); color: var(--muted); }
.calc-body { padding: 1.35rem; display: grid; gap: 1.1rem; }

.field { display: grid; gap: .4rem; }
.field > label, .field > .label { font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); }
.field .hint { font-size: .78rem; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit {
  position: absolute; right: .9rem; font-size: .9rem; color: var(--muted); pointer-events: none;
}
.calc input[type="text"] {
  font: inherit; font-size: 1rem; color: var(--ink); width: 100%;
  background: var(--ground); border: 1px solid var(--rule-input);
  border-radius: 8px; padding: .7rem 2.4rem .7rem .9rem; min-height: 48px;
  font-variant-numeric: tabular-nums;
}
.calc input:focus-visible { border-color: var(--primary); }

/* Kinderzähler */
.stepper { display: flex; align-items: center; gap: .5rem; }
.stepper button {
  width: 48px; height: 48px; flex: none; border-radius: 8px; cursor: pointer;
  background: var(--ground); border: 1px solid var(--rule-input); color: var(--ink);
  font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
}
.stepper button:hover { border-color: var(--primary); color: var(--primary); }
.calc .stepper input[type="text"] { text-align: center; padding-right: .9rem; }

.check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; font-size: var(--step--1); color: var(--ink-soft); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--primary); }

.calc-out { padding: 1.35rem; background: var(--primary-tint); border-top: 1px solid var(--rule); display: grid; gap: .9rem; }
.calc-out .out-label { font-size: var(--step--1); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.calc-out .out-value {
  font-family: "Familjen Grotesk", sans-serif; font-weight: 700;
  font-size: var(--step-num); line-height: 1; letter-spacing: -.03em; color: var(--ink);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.breakdown { display: grid; gap: 0; font-size: var(--step--1); }
.breakdown div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.breakdown div:last-child { border-bottom: 0; }
.breakdown b { color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .summe span, .breakdown .betrag span { color: var(--ink-soft); font-weight: 600; }
.breakdown .summe b, .breakdown .betrag b { color: var(--ink); }
.breakdown .posten { padding-left: .9rem; }
.calc-note { font-size: .78rem; color: var(--muted); line-height: 1.55; }

.calc-cta { padding: 1.1rem 1.35rem 1.35rem; display: grid; gap: .7rem; border-top: 1px solid var(--rule); background: var(--surface); }
.calc-cta p { font-size: var(--step--1); color: var(--muted); }

/* --- Eignung ------------------------------------------------------ */
.fit { display: grid; gap: 1.25rem; }
@media (min-width: 820px) { .fit { grid-template-columns: 1fr 1fr; } }
.fit-card { padding: 1.5rem; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface); display: grid; gap: .8rem; align-content: start; }
.fit-card.yes { border-left: 4px solid var(--primary); }
.fit-card.no { border-left: 4px solid var(--rule-strong); }
.fit-card ul { list-style: none; padding: 0; display: grid; gap: .6rem; font-size: .97rem; color: var(--ink-soft); }
.fit-card li { display: grid; grid-template-columns: 20px 1fr; gap: .7rem; align-items: start; }
.fit-card li svg { width: 20px; height: 20px; margin-top: .18rem; }
.fit-card.yes li svg { color: var(--primary); }
.fit-card.no li svg { color: var(--muted); }
.fit-card .fit-note { font-size: var(--step--1); color: var(--muted); }

/* --- Vorteile ------------------------------------------------------ */
.benefits { display: grid; gap: 1.1rem; }
@media (min-width: 720px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1060px) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefit {
  display: grid; gap: .55rem; align-content: start;
  padding: 1.4rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule);
}
.benefit .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-tint); color: var(--primary); display: grid; place-items: center; margin-bottom: .3rem; }
.benefit .mark svg { width: 18px; height: 18px; }
.benefit p { font-size: var(--step--1); color: var(--muted); line-height: 1.6; }

/* --- Ablauf --------------------------------------------------------- */
.steps { list-style: none; padding: 0; display: grid; gap: 1.1rem; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: s; position: relative; display: grid; gap: .5rem; align-content: start;
  padding: 1.35rem 1.25rem 1.5rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule);
}
.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 999px; margin-bottom: .3rem;
  background: var(--primary); color: var(--on-primary);
  font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: .95rem;
}
.steps p { font-size: var(--step--1); color: var(--muted); line-height: 1.6; }

/* --- Person ---------------------------------------------------------- */
.person { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: center; }
@media (min-width: 860px) { .person { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } }
.person figure { margin: 0; max-width: 320px; }
.person .frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--ground-alt); aspect-ratio: 3 / 4; }
.person img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.person figcaption { padding-top: .8rem; font-size: var(--step--1); color: var(--muted); }
.person-text { display: grid; gap: 1rem; max-width: 62ch; }
.person-text p { color: var(--ink-soft); }
.person-facts { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }

/* --- Kontakt ----------------------------------------------------------- */
.contact { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
@media (min-width: 860px) { .contact { grid-template-columns: 1fr 1fr; } }
.contact > * { min-width: 0; }
.contact-panel { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); display: grid; gap: 1.3rem; align-content: start; }
.contact-panel dl { display: grid; gap: 1.1rem; margin: 0; }
.contact-panel dt { font-size: var(--step--1); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.contact-panel dd { margin: 0; color: var(--ink); }
.contact-panel .zeiten { font-size: var(--step--1); color: var(--muted); }
.tel-big { font-family: "Familjen Grotesk", sans-serif; font-weight: 700; font-size: var(--step-2); color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tel-big:hover { color: var(--primary); }
address { font-style: normal; line-height: 1.7; }

.form-card { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); display: grid; gap: 1rem; align-content: start; }

/* --- Innenseiten: Kopf und Rumpf --------------------------------- */
.page-head { padding-block: clamp(2.25rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.25rem); background: linear-gradient(180deg, var(--ground-alt), var(--ground)); }
.page-head .wrap { display: flex; flex-direction: column; gap: .8rem; }
.page-head h1 { font-size: var(--step-3); max-width: 32ch; }
.page-head .lede { max-width: 60ch; }
.page-body { padding-block: clamp(1.5rem, 3vw, 2.5rem) var(--band); }

.breadcrumb {
  font-size: var(--step--1); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline;
}
.breadcrumb a { color: var(--muted); text-decoration: none; display: inline-block; padding-block: .25rem; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--ink-soft); }

/* Kostenrechner-Seite: Rechner neben dem Erklärtext. Auf schmalen
   Schirmen steht der Rechner oben, er ist der Grund des Besuchs. */
.rechner-seite { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: start; }
.rechner-seite > * { min-width: 0; }
@media (min-width: 960px) {
  .rechner-seite { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
  .rechner-seite > .calc { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--kopfhoehe) + 1.5rem); }
  .rechner-seite > .entry-content { grid-column: 1; grid-row: 1; }
  .admin-bar .rechner-seite > .calc { top: calc(var(--kopfhoehe) + 32px + 1.5rem); }
}

/* Kontaktband unter Inhaltsseiten. */
.kontakt-band {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: 12px; background: var(--primary-tint); border: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.kontakt-band p { color: var(--ink-soft); max-width: 52ch; }
.kontakt-band b { display: block; font-family: "Familjen Grotesk", sans-serif; font-size: var(--step-1); color: var(--ink); margin-bottom: .2rem; }
.kontakt-band .aktionen { display: flex; flex-wrap: wrap; gap: .6rem; }

.hinweis {
  padding: 1.1rem 1.3rem; background: var(--surface); border-radius: 10px;
  border: 1px solid var(--rule); border-left: 3px solid var(--primary);
  color: var(--ink-soft); max-width: var(--measure);
}

/* --- Seiteninhalt aus dem Editor --------------------------------- */
.entry-content { display: flex; flex-direction: column; gap: 1.1rem; max-width: var(--measure); }
.entry-content > * { margin: 0; min-width: 0; }
.entry-content > .alignwide, .entry-content > .alignfull { max-width: none; }
.entry-content p { color: var(--ink-soft); }
.entry-content h2 { font-size: var(--step-2); margin-top: 1.2rem; }
.entry-content h3 { font-size: var(--step-1); margin-top: .8rem; }
.entry-content h4 { font-family: "Public Sans", sans-serif; font-size: 1rem; font-weight: 600; margin-top: .6rem; color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; display: grid; gap: .45rem; color: var(--ink-soft); }
.entry-content li::marker { color: var(--primary); }
.entry-content a { color: var(--primary); padding-block: .2rem; }
.entry-content a:hover { color: var(--ink); }
.entry-content a.btn-primary,
.entry-content a.btn-primary:hover { color: var(--on-primary); padding-block: .8rem; }
.entry-content strong { color: var(--ink); font-weight: 600; }
.entry-content img, .entry-content .wp-block-image img { height: auto; border-radius: 10px; }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--rule); width: 100%; }
.entry-content p, .entry-content li, .entry-content dd, .entry-content td, .entry-content th,
.entry-content h2, .entry-content h3, .entry-content h4 { overflow-wrap: anywhere; }

.entry-content .wp-block-table, .entry-content .tabelle-scroll { overflow-x: auto; max-width: 100%; }
.entry-content table { border-collapse: collapse; font-size: .97rem; width: 100%; }
.entry-content th, .entry-content td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.entry-content th { font-weight: 600; color: var(--ink); background: var(--ground-alt); }

.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.5rem; border-radius: var(--radius);
  background: var(--primary); color: var(--on-primary);
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600; text-decoration: none;
}
.entry-content .wp-block-button__link { color: var(--on-primary); }
.wp-block-button__link:hover, .entry-content .wp-block-button__link:hover { background: var(--primary-hover); color: var(--on-primary); }

.alignleft { float: left; margin: .35rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .35rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, .gallery-caption, figcaption { font-size: var(--step--1); color: var(--muted); padding-top: .5rem; line-height: 1.5; }

/* --- Contact Form 7 ------------------------------------------------ */
/* Das Formular kommt von CF7 und bekommt hier die Anmutung des Entwurfs. */
.wpcf7 form { display: grid; gap: 1rem; }
.wpcf7 p { margin: 0; display: grid; gap: .4rem; min-width: 0; }
.wpcf7 label { display: grid; gap: .4rem; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); }
.wpcf7 .wpcf7-form-control-wrap { display: block; min-width: 0; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"],
.wpcf7 input[type="url"], .wpcf7 input[type="number"], .wpcf7 input[type="date"],
.wpcf7 select, .wpcf7 textarea {
  font: inherit; font-size: 1rem; width: 100%; min-width: 0; color: var(--ink);
  background: var(--ground); border: 1px solid var(--rule-input);
  border-radius: 8px; padding: .7rem .9rem; min-height: 48px;
}
.wpcf7 textarea { min-height: 120px; resize: vertical; }
.wpcf7 input:focus-visible, .wpcf7 select:focus-visible, .wpcf7 textarea:focus-visible { border-color: var(--primary); }
/* Datumsfelder haben in Chrome eigene Tab-Halte (Tag, Monat, Jahr,
   Kalender). Auf dem Kalendersymbol trägt das Feld nur :focus-within
   (gemessen in Chrome) – der Rahmen soll trotzdem stehen. */
.wpcf7 input[type="date"]:focus,
.wpcf7 input[type="date"]:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--primary); }
.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"] { width: 24px; height: 24px; min-height: 0; accent-color: var(--primary); }
.wpcf7 .wpcf7-list-item { margin: 0; }
/* Die Regel für .wpcf7 label stapelt als Raster — Kästchen und Text
   eines Ankreuzfelds gehören nebeneinander (wie bei ra-arnst.de). */
.wpcf7 .wpcf7-list-item label { display: flex; align-items: flex-start; gap: .7rem; font-weight: 400; }
.wpcf7 .wpcf7-list-item input { flex: none; margin: .1rem 0 0; }
.wpcf7 .wpcf7-list-item-label { min-width: 0; font-size: .84rem; color: var(--muted); line-height: 1.55; }
.wpcf7 input[type="submit"], .wpcf7 button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; justify-self: start;
  min-height: 50px; padding: .8rem 1.5rem; border-radius: var(--radius);
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600; font-size: 1rem;
  background: var(--primary); color: var(--on-primary); border: 1px solid transparent; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover, .wpcf7 button[type="submit"]:hover { background: var(--primary-hover); }
.wpcf7 .wpcf7-not-valid { border-color: var(--fehler); }
.wpcf7 .wpcf7-not-valid-tip { font-size: var(--step--1); color: var(--fehler); font-weight: 400; }
.wpcf7 .wpcf7-response-output {
  margin: 0; padding: .8rem 1rem; border: 0; border-radius: 8px;
  border-left: 3px solid var(--primary); background: var(--primary-tint);
  font-size: .9rem; color: var(--ink-soft);
}
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-left-color: var(--fehler); }
.wpcf7-spinner { margin: 0 0 0 .6rem; }

/* --- Online-Antrag (CF7-Formular „Antrag“, assets/js/antrag.js) ------ */
/* Ohne Skript stehen alle Schritte untereinander; die Knöpfe „Weiter“ und
   „Zurück“ erscheinen erst, wenn das Skript läuft (.antrag-js). */
.antrag { display: grid; gap: 1.5rem; }
.antrag-schritt {
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
  padding: clamp(1.25rem, 3vw, 2rem); margin: 0; min-width: 0;
  display: grid; gap: 1.25rem;
}
.antrag-schritt > legend {
  float: left; width: 100%; padding: 0;
  font-family: "Familjen Grotesk", sans-serif; font-weight: 600; font-size: var(--step-2);
  letter-spacing: -.02em; color: var(--ink);
}
.antrag-schritt > legend + * { clear: both; }
.antrag-schritt > legend:focus { outline: none; }
.antrag-text { color: var(--ink-soft); max-width: 62ch; }
.antrag-felder { display: grid; gap: 1rem 1.25rem; }
@media (min-width: 640px) { .antrag-felder { grid-template-columns: 1fr 1fr; } }
.antrag-felder > * { min-width: 0; }
.antrag-feld.breit, .antrag-felder > .breit, .antrag-frage { grid-column: 1 / -1; }
.antrag .antrag-feld { display: grid; gap: .4rem; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); }
.antrag-zwischen { font-weight: 600; color: var(--ink); margin-top: .4rem; }
.antrag-frage {
  border: 0; padding: .9rem 0 0; margin: 0; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem;
}
.antrag-frage > legend { float: left; padding: 0; font-size: .97rem; color: var(--ink-soft); max-width: 46ch; }
.antrag .wpcf7-radio { display: flex; gap: .4rem 1.25rem; }
.antrag .wpcf7-radio .wpcf7-list-item label { font-size: .97rem; color: var(--ink); align-items: center; }
.antrag-gericht {
  padding: 1rem 1.2rem; border-radius: 10px; background: var(--primary-tint);
  border-left: 3px solid var(--primary); display: grid; gap: .5rem; color: var(--ink-soft);
}
.antrag-gericht strong { color: var(--ink); }
.antrag .antrag-gericht p, .antrag p.antrag-text, .antrag p.antrag-hinweis { display: block; }
.antrag-kind { border-top: 1px solid var(--rule); padding-top: 1rem; display: grid; gap: .75rem; }
.antrag-einwilligung { display: grid; gap: .5rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.antrag-hinweis { font-size: .84rem; font-style: italic; color: var(--muted); }
.antrag-nav { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.antrag-nav [data-weiter], .antrag-nav [data-zurueck] { display: none; }
.antrag-js .antrag-nav [data-weiter], .antrag-js .antrag-nav [data-zurueck] { display: inline-flex; }
.antrag-js .antrag-nav [data-weiter] { margin-left: auto; }
.antrag-nav .wpcf7-submit { margin-left: auto; }
.antrag-nav .wpcf7-spinner { order: 3; }

/* Fortschritt: nur mit Skript. */
.antrag .antrag-stand {
  list-style: none; padding: 0; margin: 0; counter-reset: st;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem;
}
.antrag-stand li {
  counter-increment: st; font-size: .78rem; color: var(--muted); line-height: 1.3;
  padding-top: .55rem; border-top: 3px solid var(--rule); min-width: 0; overflow-wrap: anywhere;
}
.antrag-stand li::before { content: counter(st) ". "; font-weight: 600; }
.antrag-stand li.fertig { border-top-color: var(--primary); color: var(--ink-soft); }
.antrag-stand li[aria-current="step"] { border-top-color: var(--primary); color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .antrag-stand li { font-size: 0; }
  .antrag-stand li::before { font-size: .85rem; }
}

/* --- Fuß --------------------------------------------------------------- */
.site-foot { background: var(--ground-alt); border-top: 1px solid var(--rule); padding-block: clamp(2.75rem, 5vw, 4rem) 0; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-grid > * { min-width: 0; }
.foot-grid h2 { font-family: "Public Sans", sans-serif; font-size: var(--step--1); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.foot-grid ul { list-style: none; padding: 0; display: grid; gap: .3rem; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; font-size: .94rem; display: inline-block; padding-block: .25rem; }
.foot-grid a:hover { color: var(--primary); text-decoration: underline; }
.foot-grid address { font-size: .94rem; color: var(--ink-soft); }
.foot-grid address a { padding-block: 0; }
.foot-bottom {
  margin-top: clamp(2rem, 4vw, 3rem); padding-block: 1.15rem; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between;
  font-size: .84rem; color: var(--muted);
}

/* --- Mobile Anrufleiste (wie ra-arnst.de) -------------------------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: 1px; background: var(--rule-strong);
  border-top: 1px solid var(--rule-strong);
  padding-bottom: env(safe-area-inset-bottom);
}
.callbar a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 56px; text-decoration: none; font-weight: 600; font-family: "Familjen Grotesk", sans-serif;
}
.callbar .c-tel { background: var(--primary); color: var(--on-primary); }
.callbar .c-form { background: var(--surface); color: var(--ink); }
@media (max-width: 760px) {
  .callbar { display: flex; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

/* --- Pflichtklassen und Hilfen ----------------------------------- */
.skip { position: absolute; right: 100%; top: 0; z-index: 100; padding: .8rem 1.2rem; background: var(--primary); color: var(--on-primary); }
.skip:focus { left: 0; right: auto; }
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap;
}
.screen-reader-text:focus {
  clip-path: none; height: auto; width: auto; margin: 0; padding: .8rem 1.2rem;
  top: 0; left: 0; z-index: 100; display: block;
  background: var(--primary); color: var(--on-primary); font-size: 1rem;
}
.sticky, .bypostauthor { /* von der Theme-Prüfung verlangt */ }

.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar .masthead { top: 0; } }

/* Schmale Schirme, großer Text: nichts darf aus der Seite laufen. */
@media (max-width: 30rem) {
  .btn { padding-inline: 1rem; overflow-wrap: anywhere; }
  h1, h2, h3, .entry-content p, .entry-content li { hyphens: auto; -webkit-hyphens: auto; }
}

/* --- Druck ------------------------------------------------------------ */
@media print {
  .topbar, .masthead, .callbar, .site-foot, form:not(.calc), .skip, .kontakt-band { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; border-top: 1px solid #ccc; }
}
