/* ============================================================
   pd+ Theme – Design System (screen.css)
   Marke (Phase 7B-Korrektur): profilsys-Grün als EINZIGER Akzent
   (verifiziert aus Logo + Live-Website, s. tokens.css) für CTAs, Links,
   Akzente, Icons, Fokus, Badges, aktive Zustände. Kein Orange, kein Blau
   mehr in der UI. Warmes Ink-Anthrazit für Text, ein eigenständiges Grün
   ausschließlich für Erfolgsmeldungen. Tokens: assets/css/tokens.css
   (dort auch Herkunft/Nachweis der Farbwerte). Mobile-first, wenig
   JS, lokale Fonts.
   ============================================================ */

/* ---------- Design Tokens (Marke/Semantik: tokens.css) ---------- */
:root {
  /* Marke – zeigen auf tokens.css, Variablennamen aus Vorphase
     beibehalten, um die ~40 bestehenden var(--pd-*)-Referenzen in
     dieser Datei nicht einzeln umbenennen zu müssen.
     WICHTIG (Phase 7B): das rohe Akzent-Grün hat auf Weiß nur 1,6:1
     Kontrast (helles Lime-Gelbgrün) - für Text/Rahmen/Icons auf hellem
     Grund wird daher durchgängig die abgedunkelte --color-brand-dark
     verwendet, NICHT die rohe --color-brand (die bleibt Button-Fill-
     Flächen mit dunklem Text vorbehalten, s. .btn--primary weiter unten).
     Einzige Ausnahme: die semantische Erfolgsmeldung verwendet weiterhin
     bewusst --color-success direkt statt --pd-green, damit Akzent-Grün
     und Erfolgs-Grün nicht kollidieren (s. Kommentar dort). */
  --pd-green:        var(--color-brand-dark); /* Rahmen/Icons/Bullets auf hellem Grund - sichtbar */
  --pd-green-bright: var(--color-brand-light); /* Text auf dunklem Grund */
  --pd-green-deep:   var(--color-brand-dark);  /* Text auf hellem Grund (AA) */
  --pd-amber:        var(--color-brand);       /* NUR fuer Flaechen mit dunklem Text (Buttons) */
  --pd-amber-deep:   var(--color-brand-hover); /* NUR fuer Hover-Flaechen (Buttons) */
  --pd-blue:         var(--color-brand-dark);  /* Links/Chips: AA-Textvariante, jetzt Gruen statt Blau */

  /* Neutrale (warm) */
  --ink:      var(--color-text);
  --ink-2:    #2a2926;
  --graphite: #3a3d42;          /* technisches Grau */
  --muted:    var(--color-text-muted);
  --line:     var(--color-border);
  --line-2:   #ece9e2;
  --paper:    var(--color-background);
  --surface:  var(--color-surface);
  --surface-alt: #f1efe9;

  /* Rollen */
  --bg:       var(--paper);
  --fg:       var(--ink);
  --fg-muted: var(--muted);
  --accent:   var(--pd-amber);
  --brand:    var(--pd-green);

  /* Typografie – 100% lokale System-Fonts (kein externer Request) */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono",
               Menlo, Consolas, monospace;

  /* Fluides Typo-Raster */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2:  clamp(1.45rem, 1.25rem + 1vw, 1.95rem);
  --step-3:  clamp(1.8rem, 1.4rem + 1.9vw, 2.7rem);
  --step-4:  clamp(2.15rem, 1.5rem + 3.1vw, 3.6rem);

  /* Abstände / Radius */
  --sp: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --section-y: clamp(3rem, 2rem + 5vw, 6rem);
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(27,26,24,.05), 0 8px 24px rgba(27,26,24,.06);
  --focus: 0 0 0 3px rgba(97,107,4,.55); /* profilsys-Gruen (--color-focus) */
}

/* ---------- Reset-Ergänzung ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Sicherheitsnetz gegen Pixel-genaue horizontale Overflows durch unsichtbare,
     absolut positionierte Elemente (z. B. Honeypot, eingeklapptes Mega-Menü) - betrifft
     nur die X-Achse, sticky-Header/Sticky-CTA (Y-Achse) bleiben unberuehrt (Prompt 8B.4). */
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--pd-blue); text-underline-offset: 2px; }
a:hover { color: var(--pd-green-deep); }
h1, h2, h3, h4 {
  line-height: 1.15; margin: 0 0 .5em; color: var(--ink); font-weight: 700; letter-spacing: -0.01em;
  /* Lange deutsche Komposita (z. B. "Fertigungssteuerung") duerfen auf schmalen
     Bildschirmen mitten im Wort umbrechen, statt die Zeile zu ueberlaufen
     (horizontaler Scroll bei 320px, gefunden auf Referenzseiten, Prompt 8A). */
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; overflow-wrap: break-word; }
strong { font-weight: 700; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--sp), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--sp), var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section--ink { background: var(--ink); color: #eceae4; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--alt { background: var(--surface-alt); }
.section-head { max-width: 60ch; margin-bottom: var(--gap); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: .05em; text-transform: uppercase; color: var(--pd-green-deep);
  margin: 0 0 .5rem; font-weight: 600;
}
@media (min-width: 640px) { .eyebrow { letter-spacing: .12em; } }
.section--ink .eyebrow { color: var(--pd-green-bright); }
.lead { font-size: var(--step-1); color: var(--fg-muted); }
.section--ink .lead { color: #c9c6bf; }

/* Grids - minmax(0,...) statt bloßem 1fr: verhindert, dass ein nicht umbrechendes
   Kind (langes Wort, Button-Text) die Spur über die Wrap-Breite hinaus aufspreizt
   (derselbe Overflow-Bug wie beim Hero, hier am Tablet-Breakpoint 768px gefunden,
   Prompt 8B.1 - jetzt an der Quelle in den Grid-Utility-Klassen behoben). */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.grid-3 { grid-template-columns: minmax(0, 1fr); }
.grid-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Skip-Link & Fokus ---------- */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
/* Auf dunklen Flächen reicht der dunkle Fokusring nicht aus (zu wenig Kontrast
   zu Anthrazit) - dort die helle Gruen-Variante verwenden. */
.section--ink :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible {
  box-shadow: 0 0 0 3px rgba(222,235,120,.7);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: var(--step-0); line-height: 1;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--pd-amber); color: var(--color-text); border-color: var(--pd-amber); }
.btn--primary:hover { background: var(--pd-amber-deep); border-color: var(--pd-amber-deep); color: var(--color-text); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: #fff; }
.section--ink .btn--secondary { color: #fff; border-color: rgba(255,255,255,.55); }
.section--ink .btn--secondary:hover { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--pd-green-deep); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--pd-green); color: var(--pd-green-deep); }
.btn--destructive { background: var(--color-error); color: #fff; border-color: var(--color-error); }
.btn--destructive:hover { background: color-mix(in srgb, var(--color-error) 85%, #000); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; pointer-events: none;
  background: var(--line); color: var(--muted); border-color: var(--line);
}
.btn--sm { padding: .55rem 1rem; font-size: var(--step--1); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
@media (max-width: 479px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  /* .p-btn (Premium-Redesign, Prompt 8B.4) fehlte dieselbe Mobil-Stapel-Regel wie .btn -
     gefunden als 3px-Overflow im CTA-Band bei 320px (QA-Sweep). */
  .btn-row .p-btn { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,246,243,.92); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .65rem; min-height: 56px; }
/* Sprungziele: verhindert, dass der sticky Header den Anfang des Ziel-Abschnitts
   verdeckt (z. B. #systemcheck-form). Grosszuegiger Wert deckt Header (~66-70px)
   plus etwas Luft ab, auch bei geöffnetem mobilem Menü/größerer Schriftskalierung. */
#systemcheck-form, #demo-form, #kontakt-form { scroll-margin-top: 96px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__logo { display: block; height: 40px; width: auto; }
/* Markenschreibweise "pd+" im Fliesstext - wird von main.js automatisch um jedes
   Vorkommen gelegt (s. main.js Abschnitt "Markenschreibweise"). */
/* text-transform: none uebersteuert Vorfahren wie .p-eyebrow/.p-hull__core-label
   (beide text-transform:uppercase) - die Markenschreibweise "pd+" bleibt so ueberall
   klein, auch innerhalb grossgeschriebener Labels (gefunden auf pdplus.how, 2026-08-06). */
.pdplus-mark { font-style: italic; font-weight: 700; text-transform: none; }
.brand__sub { display: none; font-size: .72rem; color: var(--muted); line-height: 1.1; max-width: 20ch; }
@media (min-width: 1200px) { .brand__sub { display: block; } }
.nav { display: none; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .4rem .2rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--pd-green-deep); border-bottom-color: var(--pd-green-deep); }
.header-cta { display: none; }
@media (min-width: 1200px) {
  .nav { display: flex; gap: 1.2rem; align-items: center; }
  .header-cta { display: inline-flex; }
}
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nav-toggle:hover { border-color: var(--pd-green-deep); color: var(--pd-green-deep); }
.nav-toggle:active { transform: translateY(1px); }
.nav-toggle[aria-expanded="true"] { background: var(--pd-green-deep); border-color: var(--pd-green-deep); color: #fff; }
@media (min-width: 1200px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 22px; height: 22px; }
/* Mobile menu (JS-gesteuert: Button, Escape, Linkauswahl schliessen — s. main.js) */
.mobile-nav { border-bottom: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - 64px); overflow-y: auto; }
.mobile-nav > a, .mobile-nav__group summary { display: block; padding: .9rem var(--sp); border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; min-height: 44px; }
.mobile-nav a:hover, .mobile-nav a:focus-visible, .mobile-nav__group summary:hover, .mobile-nav__group summary:focus-visible { color: var(--pd-green-deep); background: var(--surface-alt); }
.mobile-nav__cta { padding: var(--sp); }
/* Untermenüs (Lösungen/Anwendungsfälle) - natives <details>, kein JS nötig */
.mobile-nav__group summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2.5rem; }
.mobile-nav__group summary::-webkit-details-marker { display: none; }
.mobile-nav__group summary::after {
  content: "+"; position: absolute; right: var(--sp); top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--pd-green-deep);
}
.mobile-nav__group[open] summary::after { content: "–"; }
.mobile-nav__sub { background: var(--surface-alt); }
.mobile-nav__sub a { display: block; padding: .8rem var(--sp) .8rem calc(var(--sp) * 1.6); border-top: 1px solid var(--line); color: var(--graphite); text-decoration: none; font-size: var(--step--1); min-height: 44px; }
.mobile-nav__sub a:hover, .mobile-nav__sub a:focus-visible { color: var(--pd-green-deep); }
/* Aktive Seite (per JS anhand des Pfads markiert, s. main.js) */
.nav a[aria-current="page"], .mobile-nav a[aria-current="page"], .mobile-nav__group summary[aria-current="page"] {
  color: var(--pd-green-deep); font-weight: 700;
}
.nav a[aria-current="page"] { border-bottom-color: var(--pd-green-deep); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero__inner {
  padding-block: clamp(1.75rem, 1.1rem + 4vw, 5rem); display: grid;
  gap: clamp(.85rem, .6rem + 1vw, var(--gap));
  grid-template-columns: minmax(0, 1fr); /* minmax(0,...) statt impliziter Spur: verhindert,
    dass ein nicht umbrechendes Kind (z. B. Button-Text) die Spur/den Wrap ueber die
    Viewport-Breite hinaus aufspreizt (Overflow-Bug bei 320px, gefunden in Phase 7) */
}
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.15fr .85fr; align-items: center; gap: var(--gap); } }
.hero h1 { max-width: 24ch; text-wrap: balance; }
@media (min-width: 900px) { .hero h1 { max-width: 16ch; } }
.hero__claim { font-size: var(--step-0); color: var(--fg-muted); max-width: 46ch; margin-top: .3rem; }
@media (min-width: 640px) { .hero__claim { font-size: var(--step-1); } }
.hero__aside { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: var(--gap); box-shadow: var(--shadow); }
.hero__aside h2 { font-size: var(--step-1); }
.hero__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.hero__list li { padding-left: 1.6rem; position: relative; color: var(--graphite); }
.hero__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; background: var(--pd-green); border-radius: 3px; }

/* ---------- Cards (generisch) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--gap); display: flex; flex-direction: column; gap: .5rem; height: 100%;
}
.card--link { text-decoration: none; color: inherit; transition: border-color .15s, transform .12s, box-shadow .15s; }
.card--link:hover { border-color: var(--pd-green); transform: translateY(-2px); box-shadow: var(--shadow); }
.card__icon { width: 40px; height: 40px; color: var(--pd-green-deep); }
.card__kicker { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); letter-spacing: .06em; }
.card h3 { font-size: var(--step-1); margin: 0; }
.card p { margin: 0; color: var(--fg-muted); }
.card__more { margin-top: auto; font-weight: 600; color: var(--pd-green-deep); font-size: var(--step--1); }

/* Problemkarten */
.problem { border-left: 3px solid var(--color-brand-dark); }
.problem h3 { font-size: var(--step-0); }

/* Kennzahlen / Stats */
.stat { text-align: left; }
.stat__num { font-size: var(--step-3); font-weight: 800; color: var(--pd-green-deep); letter-spacing: -.02em; line-height: 1; }
.section--ink .stat__num { color: var(--pd-green-bright); }
.stat__label { color: var(--fg-muted); font-size: var(--step--1); }
.section--ink .stat__label { color: #c9c6bf; }

/* Logo-Leiste */
.logobar { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: center; }
.logobar__item {
  font-weight: 700; color: var(--graphite); opacity: .8; letter-spacing: .02em;
  padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  font-size: var(--step--1);
}
.logobar__note { text-align: center; color: var(--muted); font-size: var(--step--1); margin-top: .8rem; }

/* Vorher/Nachher */
.beforeafter { display: grid; gap: var(--gap); }
@media (min-width: 720px) { .beforeafter { grid-template-columns: 1fr 1fr; } }
.ba { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--gap); background: var(--surface); }
.ba--before { border-top: 3px solid var(--muted); }
.ba--after { border-top: 3px solid var(--pd-green); }
.ba h4 { display: flex; align-items: center; gap: .5rem; }
.ba ul { margin: 0; padding-left: 1.1rem; color: var(--fg-muted); }
.ba li { margin-bottom: .35rem; }
.prozess-kette { font-family: var(--font-mono); font-size: var(--step--1); line-height: 1.7; color: var(--graphite); margin: 0; overflow-wrap: break-word; }

/* Trust-Leiste (Prompt 8B.1) - nur belegbare Aussagen, s. docs/content-architecture.md */
.trustbar { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem; list-style: none; margin: 0; padding: 0; }
.trustbar li {
  font-size: var(--step--1); color: var(--graphite); font-weight: 600; text-align: center;
  padding-left: 1.4rem; position: relative;
}
.trustbar li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: .8rem; height: .8rem;
  background: var(--pd-green-deep); border-radius: 50%;
}

/* Ausgangssituationen (Prompt 8B.1) */
.situation__label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--pd-green-deep); font-weight: 700; margin: .9rem 0 .15rem;
}
.situation__label:first-of-type { margin-top: .3rem; }
.situation p:not(.situation__label) { margin-bottom: 0; }

/* Architekturdiagramm (Prompt 8B.1) - reines HTML/CSS, responsiv, kein externes Tool */
.arch-diagram { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 760px; margin-inline: auto; }
.arch-tier { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; width: 100%; }
.arch-box {
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: .8rem 1.2rem; font-weight: 700; color: var(--ink); text-align: center;
  box-shadow: var(--shadow); min-width: 9rem;
}
.arch-box--system { background: var(--ink); color: #fff; border-color: var(--ink); min-width: 12rem; }
.arch-box--field { flex: 1 1 9rem; }
.arch-connector {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.6rem; position: relative; width: 100%;
}
.arch-connector::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--pd-green-deep); opacity: .5;
}
.arch-connector span {
  position: relative; background: var(--bg); padding: .1rem .7rem; font-family: var(--font-mono);
  font-size: var(--step--1); color: var(--pd-green-deep); font-weight: 600; white-space: nowrap;
}
.arch-core {
  border: 2px solid var(--pd-green-deep); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--pd-green) 8%, var(--surface));
  padding: 1.2rem; width: 100%;
}
.arch-core__label { text-align: center; font-weight: 800; color: var(--pd-green-deep); margin: 0 0 .8rem; font-size: var(--step-0); }
.arch-core__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (min-width: 640px) { .arch-core__grid { grid-template-columns: repeat(4, 1fr); } }
.arch-box--module { min-width: 0; background: var(--surface); }
@media (max-width: 479px) {
  .arch-box { min-width: 0; width: 100%; }
  /* flex-direction:column dreht die Hauptachse auf vertikal - "flex: 1 1 9rem" wuerde dort
     als bevorzugte HOEHE (statt Breite) gelesen und die Boxen unnoetig weit strecken. */
  .arch-tier--bottom { flex-direction: column; }
  .arch-box--field { flex: none; }
  .arch-box--system { min-width: 0; width: 100%; }
}

/* Integration */
.integration { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .4rem .9rem; font-size: var(--step--1); color: var(--graphite);
}
.chip--group { font-weight: 600; color: var(--pd-blue); border-color: color-mix(in srgb, var(--pd-blue) 40%, var(--line)); }

/* Prozess / Ablauf */
.process { counter-reset: step; display: grid; gap: var(--gap); }
@media (min-width: 780px) { .process { grid-template-columns: repeat(3, 1fr); } }
.process__step { position: relative; padding-top: .5rem; }
.process__step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  /* --pd-green-deep (= --color-brand-dark): weisse Ziffer braucht 4,5:1,
     das rohe Akzent-Gruen erreicht auf Weiss nur 1,6:1. */
  background: var(--pd-green-deep); color: #fff; font-weight: 700; margin-bottom: .6rem;
}
.process__step h3 { font-size: var(--step-0); }

/* Referenzkarten */
.refcard { display: flex; flex-direction: column; gap: .6rem; }
.refcard__logo { font-weight: 800; color: var(--ink); font-size: var(--step-1); }
.refcard__meta { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }
.refcard__tag { align-self: flex-start; font-size: .72rem; padding: .2rem .55rem; border-radius: 6px; background: var(--surface-alt); color: var(--muted); }

/* Testimonials */
.quote { border-left: 3px solid var(--pd-green); padding-left: 1.1rem; font-size: var(--step-1); color: var(--ink); }
.quote cite { display: block; margin-top: .6rem; font-size: var(--step--1); color: var(--muted); font-style: normal; }

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

/* Ansprechpartner / Kontaktperson */
.person { display: flex; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--gap); background: var(--surface); }
.person__avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-alt); display: grid; place-items: center; font-weight: 700; color: var(--pd-green-deep); flex: 0 0 auto; }
.person__name { font-weight: 700; }
.person__role { color: var(--muted); font-size: var(--step--1); }

/* Download-Karten */
.download { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--gap); background: var(--surface); }
.download:hover { border-color: var(--pd-green); }
.download__meta { font-size: var(--step--1); color: var(--muted); }

/* CTA-Fläche */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.75rem, 1.2rem + 3vw, 3rem); }
.cta-band h2 { color: #fff; max-width: 24ch; }
.cta-band p { color: #c9c6bf; max-width: 52ch; }

/* Formular */
.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: var(--step--1); }
/* Pflichtfeld-Sternchen in Rot statt Orange: bei Fliesstext-Groesse erreicht
   selbst die dunkle Orange-Stufe nicht die geforderten 4,5:1 auf Weiss. */
.field .req { color: var(--color-error); }
.field input, .field select, .field textarea {
  font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pd-green); box-shadow: var(--focus); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.field__hint { font-size: var(--step--1); color: var(--muted); }
.form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--step--1); color: var(--fg-muted); }
.form__consent input { width: auto; margin-top: .2rem; }
.form__note { font-size: var(--step--1); color: var(--muted); }

/* Systemcheck zweistufig (Prompt 8A): Schritt-Label + natives <details> fuer Schritt 2 */
.form__step-label {
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600;
  color: var(--pd-green-deep); letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 .3rem;
}
.form__step2 { border: 1px solid var(--line); border-radius: var(--radius); margin-top: .5rem; }
.form__step2 summary {
  cursor: pointer; padding: .9rem 1rem; font-weight: 600; color: var(--ink);
  list-style: none; position: relative;
}
.form__step2 summary::-webkit-details-marker { display: none; }
.form__step2 summary::after {
  content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--pd-green-deep);
}
.form__step2[open] summary::after { content: "–"; }
.form__step2 summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.form__step2-body { padding: 0 1rem 1rem; display: grid; gap: 1rem; }
.form-status { padding: .8rem 1rem; border-radius: 8px; display: none; }
/* Bewusst --color-success direkt (nicht --pd-green, das jetzt der UI-Akzent
   Gruen ist) – eigenstaendige, vom Akzent unterscheidbare Erfolgsfarbe,
   damit CTA-Gruen und "Erfolgreich gesendet" nicht optisch verschmelzen. */
.form-status--ok { display: block; background: color-mix(in srgb, var(--color-success) 15%, #fff); border: 1px solid var(--color-success); color: var(--color-text); }
.form-status--err { display: block; background: color-mix(in srgb, var(--color-error) 10%, #fff); border: 1px solid var(--color-error); color: var(--color-error); }
/* Lösungsfinder */
.finder__progress { position: relative; height: 6px; background: var(--line); border-radius: 4px; margin-bottom: 1.6rem; }
.finder__progress-bar { height: 100%; background: var(--pd-green); border-radius: 4px; transition: width .2s ease; }
@media (prefers-reduced-motion: reduce) { .finder__progress-bar { transition: none; } }
.finder__progress-label { display: block; margin-top: .5rem; font-size: var(--step--1); color: var(--muted); }
.finder__step legend { font-weight: 700; font-size: var(--step-1); margin-bottom: 1rem; padding: 0; }
.finder__options { display: grid; gap: .6rem; }
.finder__option { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.finder__option:hover { border-color: var(--pd-green); }
.finder__option input { margin-top: .2rem; }
.finder__option:has(input:focus-visible) { box-shadow: var(--focus); }
.finder__nav { margin-top: 1.6rem; justify-content: space-between; }
.finder__result-ctas { margin-top: 1.6rem; }
/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Prose (Ghost content) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose img { border-radius: var(--radius); }
.prose blockquote { border-left: 3px solid var(--pd-green); margin: 1.5em 0; padding-left: 1.1rem; color: var(--graphite); font-size: var(--step-1); }

/* Sticky mobile CTA – kompakt, einzeilig, Safe-Area-bewusst (Phase 7) */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: .5rem var(--sp) calc(.5rem + env(safe-area-inset-bottom, 0px));
  background: rgba(27,26,24,.97); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,.12);
  transition: transform .18s ease;
}
.sticky-cta__btn { display: flex; width: 100%; justify-content: center; padding-block: .65rem; }
@media (min-width: 1200px) { .sticky-cta { display: none; } }
/* Automatisch ausblenden: geöffnetes Menü, fokussiertes Formularfeld, sichtbare
   Bildschirmtastatur, Footer sichtbar (Prompt 8B.4H: keyboard-open ergaenzt main.js'
   visualViewport-Erkennung fuer Feldtypen, die die Tastatur ohne klassisches focus
   auf dem umschliessenden Element oeffnen) */
body.nav-open .sticky-cta,
body.field-focused .sticky-cta,
body.keyboard-open .sticky-cta,
body.footer-in-view .sticky-cta,
body.ctaband-in-view .sticky-cta {
  transform: translateY(100%);
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }
/* --sticky-cta-h wird von main.js per ResizeObserver auf die tatsaechlich gerenderte Hoehe
   (inkl. eigenem Safe-Area-Padding) gesetzt - verhindert eine Lücke oder Überlappung, falls
   der Buttontext durch Sprachkuerzung/Systemschrift/Zoom je Geraet doch einmal abweicht. Der
   feste Fallback-Wert gilt nur, solange JS noch nicht gelaufen ist. */
body.has-sticky-cta { padding-bottom: var(--sticky-cta-h, calc(3.6rem + env(safe-area-inset-bottom, 0px))); }
@media (min-width: 1200px) { body.has-sticky-cta { padding-bottom: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9b6ae; padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 2rem; }
.site-footer a { color: #d9d6ce; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-col h4 { color: #fff; font-size: var(--step-0); margin-bottom: .7rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-brand__mark { margin-bottom: .6rem; }
.footer-brand__logo {
  display: block; height: 40px; width: auto; margin-top: .5rem;
  /* Reale profilsys-Wortmarke ist dunkel/transparent (fuer helle Flaechen) -
     auf dem dunklen Footer wird sie zur Lesbarkeit einfarbig auf Weiss gedreht. */
  filter: brightness(0) invert(1); opacity: .92;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: var(--step--1); }
.footer-rueckruf { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.2rem; }
.footer-rueckruf summary { cursor: pointer; font-weight: 600; color: #fff; }
.footer-rueckruf summary:focus-visible { outline: 2px solid var(--pd-amber); outline-offset: 3px; }
.footer-rueckruf__body { max-width: 32rem; margin-top: 1rem; }

/* ---------- Ghost / Koenig content ---------- */
.gh-content .kg-width-wide { width: min(100vw - 2*var(--sp), 1000px); max-width: 1000px; margin-inline: auto; }
.gh-content .kg-width-full { width: 100%; max-width: 100%; }
.gh-content figure { margin: 1.5em 0; }
.gh-content figcaption { text-align: center; color: var(--muted); font-size: var(--step--1); margin-top: .5rem; }
.gh-content .kg-card { margin: 1.5em 0; }
.gh-content .kg-image { border-radius: var(--radius); }
.gh-content .kg-embed-card, .gh-content .kg-gallery-card { margin: 1.5em 0; }
.gh-content .kg-bookmark-card a { text-decoration: none; }
.gh-content .kg-callout-card { border-left: 3px solid var(--pd-green); background: var(--surface-alt); padding: 1rem 1.2rem; border-radius: 8px; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* Tabellen in Post-Content (z. B. Wissensartikel-Entscheidungsmatrizen, Prompt 8B.3):
   "display:block" auf <table> macht die Tabelle selbst zum scrollbaren Block-Container,
   ohne dass ein zusaetzliches Wrapper-<div> im Content-HTML noetig ist (Ghosts HTML-Import
   ueber source=html ist fuer einfache Tags zuverlaessig, fuer neue Wrapper-Divs mit eigenen
   Klassen nicht garantiert verlustfrei - s. docs/solution-page-template.md §1). Rows/Cells
   behalten ihr normales table-row/table-cell-Layout, nur die Aussenbox wird ueberlaufbar. */
.gh-content table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: var(--step--1); -webkit-overflow-scrolling: touch; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.gh-content th { background: var(--color-brand-soft); font-weight: 700; }

/* Utilities */
.u-center { text-align: center; }
.u-mt { margin-top: var(--gap); }
.u-mt-lg { margin-top: var(--section-y); }
.u-pt-sm { padding-top: .9rem; }

/* Breadcrumbs (Prompt 8B.3 §6/§7, ueberarbeitet Prompt 8B.4J §6): keine freistehende weisse
   Leiste mehr - .p-breadcrumbbar traegt jetzt selbst einen Hintergrund und geht dadurch nahtlos
   in den unmittelbar folgenden Hero ueber (dunkel per Standard, da die Mehrheit der Seiten
   .p-hero nutzt; helle Ausnahme fuer die verbleibenden Seiten mit noch hellem Standard-Hero
   weiter unten ueber body-Klassen). Kompakt: .55rem Innenabstand statt einer eigenen grossen
   Sektion, damit keine zusaetzliche, unnoetige Hoehe entsteht. */
.p-breadcrumbbar { background: var(--color-bg-dark, #14181a); padding-block: .55rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; font-size: .78rem; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .3rem; color: #5a5d57; }
.breadcrumbs a { color: #9a9d97; text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-brand-bright, var(--pd-green)); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs li[aria-current="page"] { color: #e4e6e1; font-weight: 600; }
/* Helle Ausnahme: Seiten, die (noch) den urspruenglichen hellen Standard-Hero (.hero) nutzen
   statt der dunklen Premium-Variante (.p-hero) - body_class liefert "page-{slug}" bereits
   automatisch, keine zusaetzliche Handlebars-Logik in breadcrumbs.hbs noetig. */
body.page-systemcheck .p-breadcrumbbar, body.page-demo .p-breadcrumbbar, body.page-kontakt .p-breadcrumbbar,
body.page-downloads .p-breadcrumbbar, body.page-datenschutz .p-breadcrumbbar, body.page-impressum .p-breadcrumbbar {
  background: var(--surface);
}
body.page-systemcheck .breadcrumbs a, body.page-demo .breadcrumbs a, body.page-kontakt .breadcrumbs a,
body.page-downloads .breadcrumbs a, body.page-datenschutz .breadcrumbs a, body.page-impressum .breadcrumbs a,
body.page-systemcheck .breadcrumbs li:not([aria-current]), body.page-demo .breadcrumbs li:not([aria-current]), body.page-kontakt .breadcrumbs li:not([aria-current]),
body.page-downloads .breadcrumbs li:not([aria-current]), body.page-datenschutz .breadcrumbs li:not([aria-current]), body.page-impressum .breadcrumbs li:not([aria-current]) {
  color: var(--muted);
}
body.page-systemcheck .breadcrumbs li[aria-current="page"], body.page-demo .breadcrumbs li[aria-current="page"], body.page-kontakt .breadcrumbs li[aria-current="page"],
body.page-downloads .breadcrumbs li[aria-current="page"], body.page-datenschutz .breadcrumbs li[aria-current="page"], body.page-impressum .breadcrumbs li[aria-current="page"] {
  color: var(--ink);
}
body.page-systemcheck .breadcrumbs li:not(:last-child)::after, body.page-demo .breadcrumbs li:not(:last-child)::after, body.page-kontakt .breadcrumbs li:not(:last-child)::after,
body.page-downloads .breadcrumbs li:not(:last-child)::after, body.page-datenschutz .breadcrumbs li:not(:last-child)::after, body.page-impressum .breadcrumbs li:not(:last-child)::after {
  color: var(--line);
}
/* "Start > Titel" (2 Ebenen) bietet auf Mobil keinen echten Orientierungswert - dort
   ausgeblendet; die 3-stufigen Faelle (Loesung/Anwendungsfall/Referenz/Wissen > Titel) bleiben
   auf allen Breiten sichtbar (Prompt 8B.4J §6). */
@media (max-width: 767px) { .p-breadcrumbbar--shallow { display: none; } }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-green-deep); background: color-mix(in srgb, var(--pd-green) 12%, #fff); padding: .25rem .6rem; border-radius: 6px; }
.pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: var(--section-y); }

/* Druckansicht (u.a. ROI-Rechner-Ergebnis, Referenzen) */
@media print {
  .site-header, .site-footer, .sticky-cta, .skip-link, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .card, .cta-band { border: 1px solid #999; box-shadow: none; }
}
