/* ==========================================================================
   MOODBAU — Design System (Phase 3)
   German precision + real Baustelle + premium editorial. Near-monochrome
   graphite/warm-white base with ONE restrained amber/rust accent used
   sparingly (small UI, never as a large fill) — evokes raw material
   (oxidised steel, copper) rather than "safety-vest" construction cliché.
   ========================================================================== */

:root {
  /* ---- Color: base graphite/paper system --------------------------------- */
  --ink-900: #16140F;   /* primary text / solid fills */
  --ink-800: #1C1917;   /* brand black */
  --ink-600: #44403C;
  --ink-400: #78716C;
  --ink-300: #A8A29E;
  --ink-200: #D6D3D1;
  --ink-100: #E7E4E1;
  --paper-100: #FAFAF9; /* warm off-white background */
  --paper-000: #FFFFFF;
  --line: rgba(28, 25, 23, 0.12);
  --line-strong: rgba(28, 25, 23, 0.24);
  --overlay-scrim: rgba(22, 20, 15, 0.55);

  /* ---- Color: restrained accent (amber/rust) ------------------------------
     --color-accent       : base swatch — borders, icons, underlines, small
                             fills. Non-text UI only (needs ~3:1, not 4.5:1).
     --color-accent-strong : for TEXT/links on LIGHT backgrounds — 6.1:1 vs paper-100.
     --color-accent-on-dark: for TEXT/links on DARK backgrounds — 5.6:1 vs ink-800/900.
     Never use --color-accent itself as body text color — use the two
     contrast-checked variants below instead. */
  --color-accent: #C97A34;
  --color-accent-strong: #9A4B14;
  --color-accent-on-dark: #D9822B;
  --color-accent-wash: rgba(201, 122, 52, 0.1);

  --color-bg: var(--paper-100);
  --color-surface: var(--paper-000);
  --color-text: var(--ink-800);
  --color-text-muted: var(--ink-400);
  --color-border: var(--line);
  --color-invert-bg: var(--ink-800);
  --color-invert-text: var(--paper-100);

  /* ---- Typography ---------------------------------------------------------
     Display: Big Shoulders Display — condensed, industrial, signage-like;
     the signature typographic move (large/uppercase headlines, stacked
     hero lines). Body: Inter — highly legible, handles German compounds
     and umlauts cleanly at small sizes. Exactly two families, kept lean. */
  --font-display: "Big Shoulders Display", "Archivo Narrow", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --step-hero: clamp(3.25rem, 7vw + 1rem, 9rem);
  --step-xl: clamp(2.5rem, 3.8vw + 1rem, 4.5rem);
  --step-lg: clamp(1.875rem, 2vw + 1rem, 2.75rem);
  --step-md: clamp(1.375rem, 0.9vw + 1rem, 1.75rem);
  --step-base: 1rem;
  --step-sm: 0.875rem;
  --step-xs: 0.75rem;
  --step-2xs: 0.6875rem; /* technical labels, fine print */

  /* ---- Spacing — 8px rhythm, --space-1 .. --space-12 ---------------------- */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;
  --space-9: 8rem;
  --space-10: 11rem;
  --space-11: 14rem;
  --space-12: 18rem;

  /* ---- Layout / grid -------------------------------------------------------
     Breakpoints (documented — CSS custom properties can't drive @media
     conditions, these are the literal values every media query in this
     file uses; keep them in sync by hand):
       --bp-xs:  320px   (smallest supported phone)
       --bp-sm:  480px
       --bp-md:  768px   (tablet)
       --bp-lg:  1024px
       --bp-xl:  1280px  (large desktop) */
  --container-max: 1320px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --grid-columns: 12;
  --grid-gap: var(--space-4);

  /* ---- Border / radius / shadow -------------------------------------------
     Deliberately sharp: architectural/industrial, not "rounded-everything
     SaaS." Shadows are near-absent — depth comes from borders and
     background-value contrast, used only where real elevation (dropdowns,
     the range-input thumb) needs it. */
  --border-hairline: 1px solid var(--line);
  --border-strong: 1px solid var(--line-strong);
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(22, 20, 15, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 20, 15, 0.08);
  --shadow-lg: 0 16px 40px rgba(22, 20, 15, 0.12);

  /* ---- Motion --------------------------------------------------------------
     --duration-*/--ease-* are the canonical names; --dur-* kept as aliases
     since dozens of existing Phase 0-2 rules already reference them. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --dur-fast: var(--duration-fast);
  --dur-base: var(--duration-base);
  --dur-slow: var(--duration-slow);

  /* ---- Z-index scale --------------------------------------------------------
     Named layers instead of arbitrary numbers scattered per-component. */
  --z-base: 0;
  --z-sticky: 10;
  --z-dropdown: 20;
  --z-header: 100;
  --z-mobile-nav: 90;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;

  --header-h: 84px;
}

/* ---------------------------------- Reset ---------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--step-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink-800);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--ink-800);
  color: var(--paper-100);
  padding: var(--space-2) var(--space-3);
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* ---------------------------------- Type ---------------------------------- */

/* Big Shoulders Display is condensed by design — it needs far less
   artificial negative tracking than a wide grotesk would, and long German
   compound words need hyphenation support rather than aggressive tightening. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.05;
  color: var(--ink-900);
  hyphens: auto;
  overflow-wrap: break-word;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-hero);
  letter-spacing: -0.01em;
  line-height: 0.92;
  hyphens: auto;
  overflow-wrap: break-word;
}
/* Uppercase is opt-in per use (e.g. the Wissen hero), not forced on every
   .display instance — Homepage's hero keeps its existing sentence case. */
.display--upper { text-transform: uppercase; }

.h1 { font-size: var(--step-xl); }
.h2 { font-size: var(--step-lg); }
.h3 { font-size: var(--step-md); }

/* Technical/metadata type — captions, timestamps, fact labels, numbers */
.caption {
  font-family: var(--font-body);
  font-size: var(--step-xs);
  color: var(--ink-400);
  line-height: 1.5;
}
.meta {
  font-family: var(--font-body);
  font-size: var(--step-sm);
  color: var(--ink-400);
}
.technical-label {
  font-family: var(--font-body);
  font-size: var(--step-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}
/* Numbers (project facts, step counters, stats) — tabular figures so
   columns of digits don't jitter in width as values change. */
.figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-400);
}

.lede {
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 42ch;
}

/* German compound words are long — allow hyphenation (uses the "de" dictionary
   from <html lang="de">) and always break rather than overflow a narrow column. */
p { color: var(--ink-600); overflow-wrap: break-word; hyphens: auto; }
.text-muted { color: var(--color-text-muted); }

/* --------------------------------- Layout --------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }

/* .content-section — spacing for hand-rolled page sections that don't
   already carry their own section padding (unlike RelatedContentSection/
   FAQSection/CTASection, which are real `.section`/`.section--tight`
   elements and are NOT touched by this class). Two rules only:
     1. heading -> content, inside one content-section
     2. content-section -> content-section, ONLY between two adjacent
        content-sections (sibling selector) — never a stray top/bottom
        margin when a content-section sits next to something else (e.g.
        .prose or a RelatedContentSection wrapper) that already manages
        its own spacing. Spacing-system audit (Werkzeuge/Projekte pages). */
.content-section > h2 { margin-bottom: var(--space-4); }
.content-section + .content-section { margin-top: var(--space-6); }
@media (max-width: 768px) {
  .content-section > h2 { margin-bottom: var(--space-3); }
  .content-section + .content-section { margin-top: var(--space-5); }
}

.section--dark {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--paper-100); }
.section--dark p { color: rgba(250, 250, 249, 0.66); }
.section--dark .eyebrow { color: rgba(250, 250, 249, 0.5); }
.section--dark .eyebrow::before { background: rgba(250, 250, 249, 0.5); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(4, 1fr); }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

/* --------------------------------- Buttons --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 1rem 1.75rem;
  min-height: 48px;
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink-800);
  color: var(--paper-100);
  border-color: var(--ink-800);
}
.btn--primary:hover { background: var(--ink-900); border-color: var(--ink-900); }

.btn--on-dark {
  background: var(--paper-100);
  color: var(--ink-900);
  border-color: var(--paper-100);
}
.btn--on-dark:hover { background: var(--ink-100); }

.btn--outline {
  background: transparent;
  color: var(--ink-800);
  border-color: var(--line-strong);
}
.btn--outline:hover { border-color: var(--ink-800); }

.btn--sm { padding: 0.7rem 1.25rem; min-height: 40px; font-size: var(--step-xs); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--step-sm);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: gap var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.link-arrow:hover { gap: var(--space-3); border-color: var(--ink-800); }
.link-arrow svg { width: 16px; height: 16px; flex-shrink: 0; }

/* --------------------------------- Header ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(250, 250, 249, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  display: inline-flex;
}
.wordmark__mark { color: var(--ink-900); }
.wordmark__mark--outline { color: var(--ink-300); }

.nav { display: none; }
@media (min-width: 1024px) {
  .nav { display: block; }
  .nav__list { display: flex; align-items: center; gap: var(--space-6); }
  .nav__item--has-sub { position: relative; }
  .nav__link {
    position: relative;
    font-size: var(--step-sm);
    font-weight: 500;
    color: var(--ink-600);
    padding-block: var(--space-2);
    transition: color var(--dur-base) var(--ease-out);
  }
  .nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--ink-900);
    transition: right var(--dur-base) var(--ease-out);
  }
  .nav__link:hover, .nav__link.is-active { color: var(--ink-900); }
  .nav__link:hover::after, .nav__link.is-active::after { right: 0; }

  .nav__sub {
    position: absolute;
    top: 100%;
    left: -1rem;
    min-width: 220px;
    background: var(--paper-000);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
    box-shadow: 0 16px 40px rgba(22, 20, 15, 0.1);
  }
  .nav__item--has-sub:hover .nav__sub,
  .nav__item--has-sub:focus-within .nav__sub {
    opacity: 1; visibility: visible; transform: translateY(0);
  }
  .nav__sub li a {
    display: block;
    padding: 0.6rem 0.75rem;
    font-size: var(--step-sm);
    color: var(--ink-600);
    border-radius: var(--radius-sm);
  }
  .nav__sub li a:hover { background: var(--paper-100); color: var(--ink-900); }
}

.site-header__actions { display: flex; align-items: center; gap: var(--space-4); }
.nav__cta { display: none; }
@media (min-width: 1024px) { .nav__cta { display: inline-flex; } }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle__bar {
  width: 22px;
  height: 1.5px;
  background: var(--ink-900);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--paper-100);
  z-index: var(--z-mobile-nav);
  overflow-y: auto;
  padding: var(--space-6) var(--container-pad);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav__list { display: flex; flex-direction: column; gap: var(--space-1); }
.mobile-nav__list > li > a {
  display: block;
  padding: var(--space-3) 0;
  font-family: var(--font-display);
  font-size: var(--step-md);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.mobile-nav__sub a { font-size: var(--step-base); font-weight: 400; color: var(--ink-400); padding-block: var(--space-2) !important; border-bottom: none !important; }
.mobile-nav__cta { margin-top: var(--space-5); width: 100%; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* --------------------------------- Footer ---------------------------------- */

.site-footer { background: var(--ink-900); color: rgba(250, 250, 249, 0.7); padding-top: var(--space-8); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-6);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(250, 250, 249, 0.12);
}
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
.site-footer .wordmark__mark { color: var(--paper-100); }
.site-footer .wordmark__mark--outline { color: rgba(250, 250, 249, 0.4); }
.site-footer__tagline { margin-top: var(--space-3); font-size: var(--step-sm); color: rgba(250, 250, 249, 0.5); }
.site-footer__heading {
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 250, 249, 0.4);
  margin-bottom: var(--space-3);
}
.site-footer__col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__col a:hover { color: var(--paper-100); }
.site-footer__address { font-style: normal; font-size: var(--step-sm); line-height: 1.8; }
.site-footer__cta { margin-top: var(--space-4); border-color: rgba(250, 250, 249, 0.24); color: var(--paper-100); }
.site-footer__cta:hover { border-color: var(--paper-100); }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-4);
  font-size: var(--step-xs);
  gap: var(--space-3);
  flex-wrap: wrap;
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-4); }
/* "Cookie-Einstellungen" is a <button> (it reopens the consent banner via
   JS, not a navigation), not an <a> — the base reset already strips
   button chrome and inherits .site-footer's text color, so it only needs
   the same hover treatment as its <a> siblings to read as one list. */
.site-footer__legal a:hover, .site-footer__legal button:hover { color: var(--paper-100); }

/* --------------------------- Consent banner --------------------------- */
/* GA4 Basic Consent Mode UI (assets/js/consent.js) — CSS/layout only past
   this point; the show/hide mechanism (the `hidden` attribute, toggled by
   consent.js) and every consent/storage/GA behavior are untouched.
   Desktop/tablet: a compact card inset from the viewport edges, near the
   bottom — not a full-bleed bar, not a centered dialog. Mobile: the same
   card flattens into an edge-to-edge bottom sheet (rounded top corners
   only) that sizes itself to its content — see the flex-basis note below
   for the bug this replaced. Reuses the existing .btn system as-is: both
   actions share the exact same size/shape (.btn's shared padding/
   min-height), one filled + one outlined, so Accept and Reject read as
   equally weighted, equally clickable choices — no pre-selected default,
   no visually diminished "reject". */
.consent-banner {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-modal);
  max-width: 860px;
  margin-inline: auto;
  background: var(--color-surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5); /* 32px — desktop card padding */
}
.consent-banner[hidden] { display: none; }
.consent-banner:focus { outline: none; } /* programmatic focus target on reopen; not a keyboard trap, nothing to ring */
.consent-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.consent-banner__text { flex: 1 1 420px; min-width: 0; }
.consent-banner__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-base);
  color: var(--ink-900);
  margin-bottom: var(--space-1);
}
.consent-banner__desc { font-size: var(--step-sm); color: var(--ink-600); }
.consent-banner__desc a { color: var(--color-accent-strong); text-decoration: underline; }
.consent-banner__desc a:hover { color: var(--ink-900); }
.consent-banner__actions { display: flex; flex-shrink: 0; gap: var(--space-3); }

@media (max-width: 768px) {
  .consent-banner {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    border-inline: 0;
    border-bottom: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: 0 -16px 40px rgba(22, 20, 15, 0.12);
    padding: var(--space-4); /* 24px — mobile sheet padding */
  }
  .consent-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  /* The actual fix for the oversized mobile card: .consent-banner__text's
     `flex: 1 1 420px` above is a WIDTH hint for the desktop row layout —
     once flex-direction flips to column here, an unset flex-basis on the
     main (now vertical) axis would otherwise be reinterpreted as a
     420px-tall box, blowing the card up to fill most of the viewport with
     empty space before the buttons. `flex: none` makes its height purely
     content-driven, which is what "sizes itself to its content" requires. */
  .consent-banner__text { flex: none; }
  .consent-banner__actions { gap: var(--space-2); }
  /* Equal-width buttons sharing one row reads as a deliberate, tidy pair
     of choices rather than two content-sized labels of different widths —
     and both stay reachable inside the initial viewport at 375–430px
     without stacking. Falls back to a vertical stack only below 360px,
     where two side-by-side 48px-tall touch targets would get uncomfortably
     narrow. */
  .consent-banner__actions .btn { flex: 1 1 0; min-width: 0; padding-inline: var(--space-3); }
}
@media (max-width: 360px) {
  .consent-banner__actions { flex-direction: column; }
  .consent-banner__actions .btn { width: 100%; }
}

/* ---------------------------------- Hero ----------------------------------- */

.hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-9);
  border-bottom: 1px solid var(--line);
}
.hero__eyebrow { margin-bottom: var(--space-4); }
.hero__title { max-width: 16ch; }
.hero__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.hero__lede-col { max-width: 34ch; }
.hero__actions { display: flex; gap: var(--space-3); flex-shrink: 0; }
@media (max-width: 800px) {
  .hero__row { flex-direction: column; align-items: flex-start; }
}

.hero-visual {
  margin-top: var(--space-7);
  aspect-ratio: 21/9;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink-100) 0%, var(--paper-100) 60%);
}
/* Homepage hero only (Visual Improvement Pass) — 21/9 crushes to a thin
   ~144px strip at 375px width with no mobile override. Scoped to
   .hero-visual--home specifically (added only in homepage.js) so
   Leistung pages, which reuse the bare .hero-visual class, are
   unaffected — and .project-hero (its own class, own existing 4/5
   mobile override) is untouched either way. Desktop is unchanged: this
   class carries no un-scoped rule of its own, so the base .hero-visual
   21/9 above still applies above 768px. */
@media (max-width: 768px) {
  .hero-visual--home { aspect-ratio: 4 / 3; }
}

/* Architectural line-grid placeholder — doubles as the wrapper for every real
   <img> in the render layer (scripts/render/html.js#mediaImage). The label
   is visible by default (this is the ORIGINAL Phase 0 behavior — pages
   authored with just a label and no <img> are unaffected). Where a real
   <img> is present, its own onload/onerror handlers (inline, no JS
   framework) hide the label on success or remove the broken image on
   failure — no extra modifier class or JS wiring needed either way. */
.media-placeholder {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  background-color: var(--ink-100);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.media-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(28,25,23,0.06), rgba(28,25,23,0) 55%);
}
.media-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* mediaImage() wraps <img> in a <picture> (WebP source + JPEG fallback)
   whenever a media-manifest entry exists for it — <picture> itself carries
   no intrinsic box, so give it the same full-bleed treatment as the <img>
   it contains; the object-fit:cover rule above still does the actual
   cropping on the real <img>. */
.media-placeholder picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.media-placeholder__label {
  position: relative;
  margin: var(--space-3);
  font-size: var(--step-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  background: rgba(250, 250, 249, 0.85);
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
}
.media-placeholder--dark {
  background-color: var(--ink-800);
  background-image:
    linear-gradient(rgba(250,250,249,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250,250,249,0.08) 1px, transparent 1px);
}
.media-placeholder--dark .media-placeholder__label {
  color: rgba(250,250,249,0.7);
  background: rgba(22,20,15,0.6);
  border-color: rgba(250,250,249,0.16);
}

/* ---------------------------------- Stats ----------------------------------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: var(--space-5) var(--space-4);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
@media (max-width: 720px) { .stat:nth-child(2n+1) { border-left: none; } }
.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-lg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: var(--space-1); font-size: var(--step-sm); color: var(--ink-400); }

/* --------------------------------- Cards ----------------------------------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr; } }

.service-card__index {
  font-family: var(--font-display);
  font-size: var(--step-sm);
  color: var(--ink-300);
  font-weight: 700;
}
.service-card h3 { margin-top: var(--space-4); }
.service-card p { margin-top: var(--space-2); font-size: var(--step-sm); }
.service-card .link-arrow { margin-top: var(--space-4); }

/* ------------------------------- Project grid -------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-tile { display: block; }
.project-tile__media { aspect-ratio: 4/5; border-radius: var(--radius-md); overflow: hidden; }
.project-tile__meta { margin-top: var(--space-3); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.project-tile__title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-base); }
.project-tile__tag { font-size: var(--step-xs); color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; }

/* --------------------------------- Process ----------------------------------- */

.process-list { display: flex; flex-direction: column; }
.process-step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-5);
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}
.process-step:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .process-step { grid-template-columns: 56px 1fr; gap: var(--space-3); } }
.process-step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-lg);
  color: var(--ink-200);
}
.process-step__body h3 { margin-bottom: var(--space-2); }
.process-step__body p { max-width: 56ch; }

/* ------------------------------- Testimonials -------------------------------- */

.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial-card { display: flex; flex-direction: column; gap: var(--space-4); }
.testimonial-card__quote { font-family: var(--font-display); font-size: var(--step-md); line-height: 1.35; color: var(--ink-900); }
.testimonial-card__meta { font-size: var(--step-sm); color: var(--ink-400); }

/* ----------------------------------- CTA -------------------------------------- */

.cta-band { text-align: center; }
.cta-band__title { max-width: 20ch; margin-inline: auto; }
.cta-band__actions { margin-top: var(--space-5); display: flex; justify-content: center; gap: var(--space-3); flex-wrap: wrap; }

/* ---------------------------------- Forms -------------------------------------- */

.form-field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-field label { font-size: var(--step-sm); font-weight: 600; color: var(--ink-800); }
.form-field .hint { font-size: var(--step-xs); color: var(--ink-400); }
.form-field input,
.form-field textarea,
.form-field select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--paper-000);
  font-size: var(--step-base);
  min-height: 48px;
  transition: border-color var(--dur-base) var(--ease-out);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--ink-800);
  outline: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-required { color: var(--ink-400); }

/* Consent checkbox (Phase 6 § 12) — its own row, not squeezed into .form-field's column layout. */
.form-checkbox { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-5); font-size: var(--step-sm); color: var(--ink-600); cursor: pointer; }
.form-checkbox input { margin-top: 0.2em; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ink-800); }
.form-checkbox a { color: inherit; text-decoration: underline; }

/* Honeypot (Phase 6 § 11) — invisible to sighted users AND screen readers
   (aria-hidden on the wrapper, off-screen here) so it's never announced as
   a real field; a human never fills it, a bot autofilling every input does. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-6); } }
.contact-info__item { padding-block: var(--space-4); border-top: 1px solid var(--line); }
.contact-info__item:first-child { border-top: none; }
.contact-info__label { font-size: var(--step-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-400); margin-bottom: var(--space-1); }
.contact-info__value { font-family: var(--font-display); font-weight: 700; font-size: var(--step-base); }

/* --------------------------------- Blog -------------------------------------- */

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card__media { aspect-ratio: 16/10; border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-4); }
.blog-card__date { font-size: var(--step-xs); color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; }
.blog-card h3 { margin-top: var(--space-2); font-size: var(--step-md); }
.blog-card p { margin-top: var(--space-2); font-size: var(--step-sm); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--space-7); margin-bottom: var(--space-3); font-size: var(--step-lg); }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-2); font-size: var(--step-md); }
.prose p { margin-bottom: var(--space-4); font-size: 1.05rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: var(--space-4); }
.prose ul li { margin-bottom: var(--space-2); color: var(--ink-600); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------- Breadcrumb ----------------------------------- */

.breadcrumb { display: flex; gap: var(--space-2); font-size: var(--step-xs); color: var(--ink-400); margin-bottom: var(--space-5); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--ink-800); }
.breadcrumb span[aria-hidden] { color: var(--ink-200); }

/* -------------------------------- FAQ -------------------------------------- */

.faq-item { border-top: 1px solid var(--line); padding-block: var(--space-4); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-base);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink-400);
  transition: transform var(--dur-base) var(--ease-out);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: var(--space-3); max-width: 60ch; }

/* -------------------------------- Utilities ------------------------------------ */

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.text-center { text-align: center; }
.max-w-content { max-width: 58ch; }

/* ------------------------------ Scroll reveal ----------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group] > * { transition-delay: calc(var(--reveal-i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ===================================================================
   Phase 3 — Wissen Design System
   German precision + real Baustelle + editorial restraint. Builds on the
   Phase 0 tokens/utilities (.card, .container, .section, .btn, .prose,
   .h1-h3, .eyebrow, .lede, .cta-band, .faq-item, .breadcrumb) — this
   section is everything genuinely new for the content layer.
   =================================================================== */

/* Progressive-enhancement flag — set on <html> by an inline script at the
   very top of <head> (scripts/render/layout.js). Its ABSENCE is the correct
   no-JS state, so anything gated behind `.js` degrades safely by default. */
.js-only { display: none; }
.js .js-only { display: block; }
.js .no-js-only { display: none; }

/* ---- Relationship vocabulary --------------------------------------------
   The accent color's one and only job sitewide: mark a place where the
   content graph becomes visible — "this came from a real project," "this
   tool is genuinely used," "this connects to other Wissen." Never
   decorative, never a button color. */
h2.relation-heading, .relation-heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-4);
}
h2.relation-heading::before { content: ""; width: 20px; height: 1px; background: var(--color-accent); flex-shrink: 0; }
.section--dark .relation-heading { color: var(--color-accent-on-dark); }
.section--dark .relation-heading::before { background: var(--color-accent-on-dark); }

/* ---- Card family ---------------------------------------------------------- */
.content-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.content-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.content-card:hover, .content-card:focus-visible { border-color: var(--line-strong); transform: translateY(-3px); }
.content-card__media { border-radius: 0; aspect-ratio: 4 / 3; }
.content-card--tool .content-card__media { aspect-ratio: 1 / 1; }
.content-card__body { padding: var(--space-4); display: flex; flex-direction: column; flex: 1; }
.content-card__eyebrow { font-size: var(--step-xs); color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; }
.content-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-md);
  line-height: 1.15;
  margin-top: var(--space-2);
  transition: color var(--duration-base) var(--ease-out);
}
.content-card:hover .content-card__title { color: var(--color-accent-strong); }
.content-card__excerpt { font-size: var(--step-sm); color: var(--ink-600); margin-top: var(--space-2); flex: 1; }
.content-card__signal {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: var(--space-3);
  font-size: var(--step-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-strong);
}
.content-card__signal::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); flex-shrink: 0; }

/* Featured / editorial card — larger, horizontal on desktop */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  overflow: hidden;
  padding: 0;
}
.featured-card .content-card__media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.featured-card .content-card__body { padding: var(--space-6); justify-content: center; }
.featured-card .content-card__title { font-size: var(--step-lg); margin-top: var(--space-3); }
.featured-card .content-card__excerpt { font-size: var(--step-base); max-width: 48ch; }
@media (max-width: 860px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .content-card__media { min-height: 220px; }
}

/* ---- Chips / tiles ----------------------------------------------------- */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.chip-row--muted { opacity: 0.8; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: var(--border-strong);
  border-radius: var(--radius-full);
  font-size: var(--step-xs);
  color: var(--ink-600);
  transition: border-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}
a.chip:hover, a.chip:focus-visible { border-color: var(--ink-800); color: var(--ink-900); }
.section--dark .chip { border-color: rgba(250, 250, 249, 0.24); color: rgba(250, 250, 249, 0.7); }
.section--dark a.chip:hover { border-color: var(--paper-100); color: var(--paper-100); }

/* Category tiles — the primary navigation surface on /wissen/, bigger and
   more deliberate than a plain filter chip. */
.category-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5);
  min-height: 140px;
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}
.category-tile:hover, .category-tile:focus-visible { border-color: var(--ink-800); background: var(--paper-000); }
.category-tile__name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-md); overflow-wrap: break-word; hyphens: auto; }
.category-tile__count { font-size: var(--step-xs); color: var(--ink-400); }

.material-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--step-xs);
  padding: 0.3rem 0.6rem;
  border: var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--ink-600);
}
a.material-badge:hover { border-color: var(--color-accent); color: var(--color-accent-strong); }
.material-badge--dormant { color: var(--ink-400); border-style: dashed; }

/* ---- Article/Tool header meta ------------------------------------------- */
.article-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--step-xs); color: var(--ink-400); margin-top: var(--space-3); }
.article-hero { width: 100%; aspect-ratio: 16 / 9; margin-top: var(--space-5); }

/* Project hero only (templates/project.js passes className "article-hero
   project-hero" and no inline aspectRatio, so this fully owns the box —
   Article/Tool heroes still pass a fixed inline 21/9 and are untouched).
   Real MOODBAU project photos are mostly portrait smartphone shots; a
   shorter, wider desktop band still reads as a clean editorial banner, but
   the same ultra-wide band on a phone crops away most of the photo. A
   taller box on narrow viewports keeps far more of the actual photo
   visible, still via object-fit: cover (see .media-placeholder img) so
   nothing is ever stretched. */
.project-hero { aspect-ratio: 16 / 9; }
@media (max-width: 640px) {
  .project-hero { aspect-ratio: 4 / 5; }
}

/* ---- Generic content blocks (BlockRenderer output) ----------------------- */
.block { margin-block: var(--space-6); }
.block__label { font-size: var(--step-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); margin-bottom: var(--space-2); }
.block__note { font-size: var(--step-sm); color: var(--ink-400); margin-bottom: var(--space-2); }

/* ProTip / Warning — distinct icon + accent language, not just a colored bar */
.callout {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border: var(--border-hairline);
  border-left: 3px solid var(--ink-800);
  border-radius: var(--radius-sm);
  background: var(--paper-000);
}
.callout__icon { flex-shrink: 0; width: 22px; height: 22px; margin-top: 0.15rem; color: var(--ink-800); }
.callout--tip { border-left-color: var(--color-accent); }
.callout--tip .callout__icon { color: var(--color-accent-strong); }
.callout--warning .callout__icon { color: var(--ink-600); }
.callout__label { font-size: var(--step-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-1); }
.callout--tip .callout__label { color: var(--color-accent-strong); }
.callout__text { color: var(--ink-600); }

.block--gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.block--gallery .media-placeholder, .media-gallery .media-placeholder { aspect-ratio: 4 / 3; }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); margin-top: var(--space-4); }
/* Featured + support hierarchy (Visual Improvement Pass, project.js) — the
   first tile spans the full grid row instead of sharing a column track,
   at its own (wider) aspect-ratio set inline per-image by mediaImage().
   Everything else keeps flowing in the same auto-fill grid below it —
   no row-spanning/masonry tricks, so there's no risk of mismatched row
   heights. On narrow viewports the grid is already a single column
   (minmax(220px, 1fr)), where this rule is a no-op — the featured tile is
   simply first, support tiles follow naturally underneath. */
.media-gallery__item--featured { grid-column: 1 / -1; }

/* Comparison — a real spec-sheet feel: aligned columns, check/cross marks */
.comparison { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.comparison__col { border: var(--border-hairline); border-radius: var(--radius-md); overflow: hidden; }
.comparison__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-base);
  padding: var(--space-4);
  border-bottom: var(--border-hairline);
  background: var(--paper-000);
}
.comparison__list { padding: var(--space-2) var(--space-4) var(--space-4); }
.comparison__item { display: flex; align-items: flex-start; gap: var(--space-2); padding-block: var(--space-2); font-size: var(--step-sm); }
.comparison__item svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 0.15rem; }
.comparison__item--pro { color: var(--ink-800); }
.comparison__item--pro svg { color: var(--color-accent-strong); }
.comparison__item--con { color: var(--ink-400); }
.comparison__item--con svg { color: var(--ink-300); }

.block--steps { list-style: none; padding: 0; }
.steps-block__item { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-3); margin-bottom: var(--space-5); }
.steps-block__num { font-family: var(--font-display); font-weight: 700; color: var(--ink-300); font-size: var(--step-md); }
.steps-block__item img { border-radius: var(--radius-sm); margin-top: var(--space-2); }

.wall-diagram__legend { margin-top: var(--space-2); padding-left: 1.1rem; font-size: var(--step-sm); color: var(--ink-600); }

/* Inline Tool/Project reference — a premium "evidence" card, distinct from
   the generic hub grid card via the accent kicker + horizontal layout */
.reference-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-4);
  align-items: center;
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.reference-card__media { aspect-ratio: 1 / 1; border-radius: var(--radius-sm); }
.reference-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-base); }
.reference-card__excerpt { font-size: var(--step-sm); color: var(--ink-600); margin-top: var(--space-1); }
@media (max-width: 480px) { .reference-card { grid-template-columns: 64px 1fr; } }

/* ---- Project facts + timeline -------------------------------------------- */
.project-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4); margin-top: var(--space-5); padding: var(--space-4) 0; border-top: var(--border-hairline); border-bottom: var(--border-hairline); }
.project-facts dt { font-size: var(--step-xs); color: var(--ink-400); text-transform: uppercase; letter-spacing: 0.06em; }
.project-facts dd { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: var(--space-1); }

.project-timeline { list-style: none; padding: 0; position: relative; }
.project-timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
@media (max-width: 640px) { .project-timeline::before { left: 19px; } }
.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-4);
  padding-block: var(--space-6);
  scroll-margin-top: calc(var(--header-h) + var(--space-3));
}
.timeline-step:first-child { padding-top: 0; }
.timeline-step__num {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper-100);
  border: var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-800);
  font-size: var(--step-sm);
  z-index: 1;
}
@media (max-width: 640px) { .timeline-step { grid-template-columns: 40px 1fr; } .timeline-step__num { width: 40px; height: 40px; font-size: var(--step-xs); } }
.timeline-step__body h3 { font-size: var(--step-lg); }
.timeline-step__body h3 a { text-decoration: none; }
.timeline-step__media { margin-top: var(--space-3); aspect-ratio: 16 / 10; }
.timeline-step video { width: 100%; border-radius: var(--radius-sm); margin-top: var(--space-3); display: block; }
.timeline-step__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }
.timeline-step__chips-label { font-size: var(--step-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-strong); }
.chip--tool { text-decoration: none; }

.testimonial { border-left: 3px solid var(--ink-800); padding: var(--space-4); margin-block: var(--space-6); font-family: var(--font-display); font-size: var(--step-md); }
.testimonial cite { display: block; margin-top: var(--space-2); font-family: var(--font-body); font-size: var(--step-sm); font-style: normal; color: var(--ink-400); }

/* ---- Tool experience panel ------------------------------------------------ */
.tool-experience { margin-top: var(--space-5); }
.tool-experience__meta { font-size: var(--step-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent-strong); }
.tool-experience__usage, .tool-experience__verdict { margin-top: var(--space-3); }
.tool-experience__verdict { padding: var(--space-4); border: var(--border-hairline); border-radius: var(--radius-md); background: var(--paper-000); }
.experience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.experience-list { border: var(--border-hairline); border-radius: var(--radius-md); padding: var(--space-4); }
.experience-list__label { font-size: var(--step-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); margin-bottom: var(--space-2); }
.experience-list ul { padding-left: 1.1rem; }
.experience-list--pros .experience-list__label { color: var(--color-accent-strong); }

/* ---- Purchase links + affiliate disclosure -------------------------------- */
.purchase-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.purchase-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  /* padding-block reduced from var(--space-4) (24px) — a single-line
     provider link doesn't need as much vertical padding as a multi-line
     card; padding-inline kept at --space-4 for horizontal breathing room.
     Shared across every Tool page, not DCF620-specific. */
  padding: var(--space-3) var(--space-4);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  transition: border-color var(--duration-base) var(--ease-out);
}
.purchase-link:hover { border-color: var(--line-strong); }
.purchase-link a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.purchase-link__provider { font-size: var(--step-xs); color: var(--ink-400); }
.purchase-link__disclosure {
  font-size: var(--step-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent-strong);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
}

/* ---- Before / After slider -------------------------------------------------
   Real <input type="range"> drives a CSS custom property; native = free
   keyboard support, free screen-reader value announcement, free touch drag.
   Defaults to the static side-by-side fallback until .js is present. */
.before-after-static { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.before-after-static figcaption {
  text-align: center; margin-top: var(--space-2);
  font-size: var(--step-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400);
}
.before-after__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--ink-100);
}
.before-after__layer { position: absolute; inset: 0; }
.before-after__layer .media-placeholder { position: static; height: 100%; aspect-ratio: auto; border-radius: 0; }
.before-after__layer--after { clip-path: inset(0 0 0 var(--reveal, 50%)); }
.before-after__divider {
  position: absolute; top: 0; bottom: 0; left: var(--reveal, 50%);
  width: 2px; background: var(--paper-000); pointer-events: none; z-index: 1;
}
.before-after__tag {
  position: absolute; top: var(--space-3); z-index: 2;
  font-size: var(--step-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(250, 250, 249, 0.9); color: var(--ink-800);
  padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
}
.before-after__tag--before { left: var(--space-3); }
.before-after__tag--after { right: var(--space-3); }
.before-after__control {
  appearance: none;
  width: 100%;
  margin-top: var(--space-4);
  height: 4px;
  background: var(--line-strong);
  border-radius: var(--radius-full);
  cursor: grab;
}
.before-after__control::-webkit-slider-thumb {
  appearance: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper-000);
  border: 2px solid var(--ink-800);
  box-shadow: var(--shadow-md);
}
.before-after__control::-moz-range-thumb {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper-000);
  border: 2px solid var(--ink-800);
  box-shadow: var(--shadow-md);
}
.before-after__control:focus-visible { outline: 2px solid var(--ink-800); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .before-after__layer--after, .before-after__divider { transition: none; } /* direct manipulation, not decorative motion — no added transition either way */
}

/* ---- Visually-hidden but accessible ------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Wissen hero + search ------------------------------------------------- */
.wissen-hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-7);
  border-bottom: var(--border-hairline);
}
.wissen-hero__title { max-width: 14ch; }
.wissen-hero__sub { margin-top: var(--space-5); }

.wissen-search { margin-top: var(--space-6); max-width: 640px; }
.wissen-search__input {
  width: 100%;
  min-height: 56px;
  padding: 1rem 1.25rem;
  font-size: var(--step-base);
  font-family: var(--font-body);
  border: var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--paper-000);
  color: var(--ink-900);
}
.wissen-search__input:focus-visible { outline: 2px solid var(--ink-800); outline-offset: 2px; border-color: var(--ink-800); }
.wissen-search__input::-webkit-search-cancel-button { cursor: pointer; }
.wissen-search__status { margin-top: var(--space-2); font-size: var(--step-xs); color: var(--ink-400); min-height: 1.2em; }
.wissen-search__empty { color: var(--ink-400); padding: var(--space-5) 0; }

/* ===================================================================
   Phase 4 — Homepage
   Reuses .hero/.stat-strip/.service-grid/.content-card-grid/.cta-band/.chip
   etc. from Phase 0/3 as-is. Only Project Check and the Region graphic are
   genuinely new shapes.
   =================================================================== */

.before-after__meta { max-width: 60ch; }

/* ---- Project Check wizard ------------------------------------------------- */
.project-check__progress {
  height: 3px;
  background: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 480px;
}
.project-check__progress-bar {
  display: block;
  height: 100%;
  width: var(--progress, 20%);
  background: var(--ink-800);
  transition: width var(--duration-base) var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .project-check__progress-bar { transition: none; }
}
.project-check__step {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-7);
}
.project-check__step legend {
  padding: 0;
  margin-bottom: var(--space-4);
  width: 100%;
}
.project-check__options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}
.option-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-4);
  border: var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}
.option-card:hover { border-color: var(--ink-800); }
.option-card:has(input:checked) { border-color: var(--ink-800); background: var(--paper-000); }
.option-card:has(input:focus-visible) { outline: 2px solid var(--ink-800); outline-offset: 2px; }
.option-card input { width: 20px; height: 20px; accent-color: var(--ink-800); flex-shrink: 0; }
.option-card span { font-weight: 600; }
.project-check__nav { display: flex; gap: var(--space-3); margin-top: var(--space-6); }
/* .btn sets display:inline-flex (an author-stylesheet rule), which — per
   normal CSS cascade rules — takes priority over the browser's default
   [hidden] { display: none } (a user-agent-stylesheet rule) regardless of
   selector specificity. Without this, toggling .hidden in
   assets/js/project-check.js (Zurück/Weiter/Anfrage senden all carry
   .btn) sets the hidden attribute correctly but has no visual effect —
   e.g. "Weiter" stayed visibly displayed on the final step even though
   JS had already marked it hidden. Scoped to this wizard's own nav only. */
.project-check__nav [hidden] { display: none; }
[data-project-check-done] { scroll-margin-top: calc(var(--header-h) + var(--space-3)); }

/* ---- Region ------------------------------------------------------------------ */
.region-section__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 860px) {
  .region-section__grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
.region-graphic {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.region-graphic__ring { position: absolute; border-radius: 50%; border: 1px solid var(--line-strong); }
.region-graphic__ring--1 { inset: 36%; }
.region-graphic__ring--2 { inset: 18%; }
.region-graphic__ring--3 { inset: 0; }
.region-graphic__label {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-sm);
  background: var(--paper-000);
  border: var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.2rem;
}

/* ===================================================================
   Phase 5A — Commercial Leistung page
   =================================================================== */

/* Service scope — editorial list, not icon boxes: large index numerals,
   generous rhythm, one clear customer-outcome sentence per item. */
.scope-list {
  border-top: var(--border-hairline);
}
.scope-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-bottom: var(--border-hairline);
}
.scope-item__index {
  font-size: var(--step-lg);
  color: var(--ink-200);
}
@media (max-width: 560px) {
  .scope-item { grid-template-columns: 48px 1fr; gap: var(--space-3); }
  .scope-item__index { font-size: var(--step-md); }
}

/* Self-qualification — concise question list on a dark section */
.qualification-list {
  display: flex;
  flex-direction: column;
  max-width: 56ch;
}
.qualification-list li {
  padding-block: var(--space-4);
  border-top: 1px solid rgba(250, 250, 249, 0.14);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-md);
  color: var(--paper-100);
}
.qualification-list li:last-child { border-bottom: 1px solid rgba(250, 250, 249, 0.14); }

/* Quality/trust — plain statements with a check mark, not a badge wall */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.trust-item svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-accent-strong); }

/* Cross-service relationship links (Phase 5B § 14) — sparing, contextual,
   framed as a qualifying question, not a generic "other services" list. */
.cross-service {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(250, 250, 249, 0.14);
  max-width: 56ch;
}
.cross-service-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-bottom: 1px solid rgba(250, 250, 249, 0.14);
  color: rgba(250, 250, 249, 0.75);
  font-size: var(--step-sm);
  transition: color var(--duration-base) var(--ease-out);
}
.cross-service-link:hover { color: var(--paper-100); }
.cross-service-link__target {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--color-accent-on-dark);
}
