/*
 * FÖHRE | Basislayout und allgemeine Elemente
 * Enthält Grundraster, Headerbasis, allgemeine Komponenten und
 * Bibliotheksgrundlagen. Wird vor design.css geladen.
 * Suchanker: [BASIS], [HEADER], [MENUE], [ABOUT],
 * [REFERENZEN], [LEGAL], [FOOTER], [COOKIES], [BIBLIOTHEK].
 */
/* ── [BASIS] Variablen, Reset und allgemeine Elemente ── */
:root {
  --page-pad: clamp(20px, 3vw, 58px);
  --container-max: 1610px;
  --site-shell-width: min(84vw, 1610px);
  --header-height: 50px;
  --header-height-scrolled: 44px;
  --content-footer-gap: 28px;
  --brand-orange: var(--foehre-color-orange);
  --brand-brown: var(--foehre-color-ochre);
  --brand-green: var(--foehre-color-green);
  --brand-grey: var(--foehre-color-paper);
  --brand-text: var(--foehre-color-black);
  --shadow: color-mix(in srgb, var(--foehre-color-green) 12%, transparent);
}

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

html {
  min-height: 100%;
  scroll-behavior:var(--foehre-motion-scroll, smooth);
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--brand-grey);
  color: var(--brand-text);
  font-family: var(--foehre-font-base);
  font-weight: var(--foehre-weight-light);
}

body.intro-active {
  overflow: hidden;
}

main {
  flex: 0 0 auto;
  display: block;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-wrap {
  padding-inline: 0;
}

.container {
  width: var(--site-shell-width);
  max-width: none;
  margin-inline: auto;
}

#site-header,
#site-footer {
  display: contents;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared header: generated centrally and identical on every page. */
/* ── [HEADER] Gemeinsamer Header ── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  background: color-mix(in srgb, var(--foehre-color-paper) 96%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--foehre-color-green) 8%, transparent);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--foehre-color-green) 5%, transparent);
  backdrop-filter: blur(6px) saturate(130%);
  transition:height var(--foehre-motion-time, 220ms) ease, box-shadow var(--foehre-motion-time, 220ms) ease;
}

body.has-scrolled .site-header {
  height: var(--header-height-scrolled);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--foehre-color-green) 9%, transparent);
}

.site-header-spacer {
  flex: 0 0 var(--header-height);
  height: var(--header-height);
  transition:height var(--foehre-motion-time, 220ms) ease, flex-basis var(--foehre-motion-time, 220ms) ease;
}

body.has-scrolled .site-header-spacer {
  flex-basis: var(--header-height-scrolled);
  height: var(--header-height-scrolled);
}

.site-header .page-wrap,
.site-header-inner {
  height: 100%;
}


.site-header-nav a,
.site-language-selector a {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--brand-green);
  font-size: 14px;
  line-height: 1;
  font-weight: var(--foehre-weight-light);
  text-decoration: none;
  white-space: nowrap;
}


.site-header-nav a:hover,
.site-header-nav a:focus-visible,
.site-language-selector a:hover,
.site-language-selector a:focus-visible {
  font-weight: var(--foehre-weight-medium);
}


.site-header-nav a[aria-current="page"],
.site-language-selector a[aria-current="page"] {
  color: var(--brand-orange);
  font-weight: var(--foehre-weight-medium);
}

.site-language-selector {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--brand-green);
  font-size: 14px;
}

.site-language-selector a {
  min-height: 32px;
  font-size: inherit;
}

.site-menu-toggle {
  position: relative;
  display: none;
  flex: 0 0 32px;
  width: 32px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-green);
  cursor: pointer;
  z-index: 1003;
}

.site-menu-toggle span {
  position: absolute;
  right: 1px;
  left: 1px;
  height: 2px;
  background: currentColor;
  transition:top var(--foehre-motion-time, 180ms) ease, transform var(--foehre-motion-time, 180ms) ease, opacity var(--foehre-motion-time, 180ms) ease;
}

.site-menu-toggle span:nth-child(1) { top: 5px; }
.site-menu-toggle span:nth-child(2) { top: 12px; }
.site-menu-toggle span:nth-child(3) { top: 19px; }

.site-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 12px;
  transform: rotate(45deg);
}
.site-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 12px;
  transform: rotate(-45deg);
}

/* ── [MENUE] Navigation und Mobilmenü ── */
.site-mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  z-index: 999;
  width: min(82vw, 300px);
  padding: 30px 22px;
  overflow-y: auto;
  background: var(--brand-green);
  box-shadow: -12px 18px 30px color-mix(in srgb, var(--foehre-color-green) 18%, transparent);
  transform: translateX(104%);
  visibility: hidden;
  transition:top var(--foehre-motion-time, 220ms) ease, transform var(--foehre-motion-time, 220ms) ease, visibility var(--foehre-motion-time, 220ms) ease;
}

body.has-scrolled .site-mobile-menu {
  top: var(--header-height-scrolled);
}

.site-mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.site-mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-mobile-nav a {
  display: block;
  padding: 13px 10px;
  color: var(--brand-grey);
  font-size: 15px;
  line-height: 1.25;
  font-weight: var(--foehre-weight-light);
  text-align: center;
  text-decoration: none;
}

.site-mobile-nav a + a {
  border-top: 1px solid color-mix(in srgb, var(--foehre-color-paper) 16%, transparent);
}

.site-mobile-nav a:hover,
.site-mobile-nav a:focus-visible,
.site-mobile-nav a[aria-current="page"] {
  font-weight: var(--foehre-weight-medium);
}


body.mobile-menu-open {
  overflow: hidden;
}

/* Intro video. */
.start-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  padding: clamp(24px, 6vw, 72px);
  overflow: hidden;
  background: var(--brand-grey);
  opacity: 1;
  transition:opacity var(--foehre-motion-time, 600ms) ease, visibility var(--foehre-motion-time, 600ms) ease;
}

.start-intro.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-intro-video {
  display: block;
  width: min(74vw, 920px);
  max-height: 72vh;
  max-height: 72svh;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: var(--brand-grey);
}

/* About-me page. The desktop shell follows the proportions of the approved
   reference: 84% viewport width, 1.827:1 column ratio and a narrow bottom
   reveal so the lower panel edge remains visible in the first viewport. */
/* ── [ABOUT] Über uns – ältere Layoutgrundlage ── */


@keyframes about-status-fly-in {
  0% { opacity: 0; transform: translateX(140%); }
  72% { opacity: 1; transform: translateX(-4px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes about-status-pulse {
  0%, 100% { box-shadow: 0 9px 22px color-mix(in srgb, var(--foehre-color-green) 14%, transparent); }
  50% { box-shadow: 0 12px 28px color-mix(in srgb, var(--foehre-color-green) 22%, transparent); }
}


body:not(.intro-active) .about-status {
  animation:about-status-fly-in var(--foehre-motion-time, 900ms) cubic-bezier(0.2, 0.8, 0.2, 1) both,
    about-status-pulse var(--foehre-motion-time, 2.8s) ease-in-out var(--foehre-motion-time, 1.2s) var(--foehre-motion-repeat, infinite);
}


/* ── [HOME-REFERENZEN] Referenzen auf der Startseite ── */
/* Two seamless, opposite-running reference rows. */


@keyframes reference-right {
  from { transform: translateX(calc(-50% - (var(--reference-gap) / 2))); }
  to { transform: translateX(0); }
}

@keyframes reference-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - (var(--reference-gap) / 2))); }
}


/* Reference overview. */
/* ── [REFERENZEN] Referenzübersicht – Basis ── */
.references-page main {
  width: 100%;
}

.references-page .content {
  padding-top: clamp(9px, 1.2vw, 15px);
  padding-bottom: var(--content-footer-gap);
}

.filters {
  width: 100%;
  margin: 0 0 clamp(18px, 2.2vw, 25px);
}

.filter-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.45vw, 5px);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.75vw, 9px);
}

.filter-chip {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 5px 7px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-text);
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: var(--foehre-weight-medium);
  text-align: center;
  cursor: pointer;
  transition:color var(--foehre-motion-time, 150ms) ease;
}

.filter-chip::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: color-mix(in srgb, var(--foehre-color-green) 24%, transparent);
  transition:height var(--foehre-motion-time, 150ms) ease, background-color var(--foehre-motion-time, 150ms) ease;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  color: var(--brand-orange);
}

.filter-chip:hover::after,
.filter-chip:focus-visible::after {
  background: color-mix(in srgb, var(--foehre-color-orange) 58%, transparent);
}

.filter-chip:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--foehre-color-orange) 35%, transparent);
  outline-offset: 2px;
}

.filter-chip[aria-pressed="true"] {
  color: var(--brand-orange);
  font-weight: var(--foehre-weight-medium);
}

.filter-chip[aria-pressed="true"]::after {
  height: 2px;
  background: var(--brand-orange);
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

.reference-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: color-mix(in srgb, var(--foehre-color-paper) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--foehre-color-green) 10%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--foehre-color-green) 8%, transparent);
  transition:transform var(--foehre-motion-time, 180ms) ease, box-shadow var(--foehre-motion-time, 180ms) ease;
}

.reference-card[hidden] {
  display: none;
}

.reference-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--foehre-color-green) 13%, transparent);
}

.reference-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) contrast(0.96) brightness(0.98) sepia(0.04);
  transition:transform var(--foehre-motion-time, 180ms) ease, filter var(--foehre-motion-time, 220ms) ease;
}

.reference-card:hover img {
  transform: scale(1.025);
  filter: saturate(0.92) contrast(0.98) brightness(1) sepia(0.02);
}

.reference-card h3 {
  margin: 0;
  padding: 15px 16px 5px;
  color: var(--brand-text);
  font-size: 16px;
  line-height: 1.25;
  font-weight: var(--foehre-weight-medium);
}

.reference-card p {
  margin: 0;
  padding: 0 16px 17px;
  color: var(--brand-text);
  font-size: 14px;
  line-height: 1.45;
}

.reference-card .reference-subtitle {
  padding: 0 16px 2px;
  font-weight: var(--foehre-weight-medium);
  line-height: 1.4;
}

.reference-card .reference-subtitle--standalone {
  padding-bottom: 10px;
}

.references-empty {
  margin: 24px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

/* Legal pages. */
/* ── [LEGAL] Rechtliche Seiten ── */
.legal-main {
  width: 100%;
  padding: clamp(28px, 4vw, 54px) 0 clamp(52px, 7vw, 90px);
}

.legal-content {
  max-width: 880px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.legal-content h1 {
  margin: 0 0 24px;
  color: var(--brand-orange);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
  font-weight: var(--foehre-weight-medium);
}

.legal-content h2 {
  margin: 28px 0 8px;
  color: var(--brand-text);
  font-size: 17px;
  line-height: 1.3;
  font-weight: var(--foehre-weight-medium);
}

.legal-content p,
.legal-content li {
  color: var(--brand-text);
  font-size: 15px;
  line-height: 1.58;
}

.legal-content p {
  margin: 0 0 14px;
}

.legal-content ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-address {
  line-height: 1.48;
}

.legal-content p.legal-meta {
  margin-top: -14px;
  font-size: 13px;
}

/* Shared footer. */
/* ── [FOOTER] Footer und Kontaktinformationen ── */
.site-footer {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}


.cookie-settings-slot {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
}

/* Cookie consent. */
/* ── [COOKIES] Cookie-Einwilligung und Einstellungen ── */
.cookie-consent {
  position: fixed;
  right: 16px;
  bottom: 18px;
  left: 16px;
  z-index: 9998;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--foehre-color-green) 10%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--foehre-color-paper) 98%, transparent);
  box-shadow: 0 16px 45px color-mix(in srgb, var(--foehre-color-green) 16%, transparent);
  opacity: 0;
  transform: translateY(10px);
  transition:opacity var(--foehre-motion-time, 180ms) ease, transform var(--foehre-motion-time, 180ms) ease;
}

.cookie-consent.open {
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent__title {
  display: block;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: var(--foehre-weight-medium);
}

.cookie-consent__text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-consent__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.cookie-consent__button {
  min-width: 132px;
  padding: 11px 16px;
  border: 1px solid color-mix(in srgb, var(--foehre-color-green) 18%, transparent);
  border-radius: 999px;
  background: var(--brand-grey);
  color: var(--brand-text);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition:transform var(--foehre-motion-time, 160ms) ease, background-color var(--foehre-motion-time, 160ms) ease, color var(--foehre-motion-time, 160ms) ease;
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
  transform: translateY(-1px);
}

.cookie-consent__button.is-active,
.cookie-consent__button[aria-pressed="true"] {
  border-color: var(--brand-orange);
  background: var(--brand-orange);
  color: var(--brand-grey);
}

.cookie-settings-button {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foehre-color-black);
  cursor: pointer;
  opacity: 0.78;
}

.cookie-settings-button:hover,
.cookie-settings-button:focus-visible {
  opacity: 1;
}


/* ── [RESPONSIVE-BASIS] Responsive Basisregeln – Reihenfolge beibehalten ── */
@media (max-width: 1100px) {
  

  .reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


}

@media (max-width: 820px) {
  :root {
    --page-pad: 20px;
    --header-height: 64px;
    --header-height-scrolled: 50px;
  }

  .page-wrap {
    padding-inline: var(--page-pad);
  }

  .container {
    width: 100%;
    max-width: var(--container-max);
  }


  .site-header-actions > .site-language-selector {
    display: inline-flex;
    gap: 5px;
    font-size: 12.5px;
  }

  .site-header-actions > .site-language-selector a {
    min-height: 30px;
  }

  .site-menu-toggle { display: block; }

  .start-intro { padding: 28px; }
  .start-intro-video {
    width: min(88vw, 520px);
    max-height: 64vh;
    max-height: 64svh;
  }


  .filter-chip {
    padding-inline: 5px;
    font-size: 10.5px;
  }


}

@media (max-width: 640px) {
  :root {
    --page-pad: 16px;
    --header-height: 60px;
    --header-height-scrolled: 48px;
  }


  .site-header-actions > .site-language-selector {
    gap: 4px;
    font-size: 11.5px;
  }
  .site-header-actions > .site-language-selector a {
    min-height: 28px;
  }


  .site-mobile-menu { width: min(86vw, 290px); padding: 24px 18px; }


  .filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 29px;
    padding: 5px 9px 6px;
    font-size: 11px;
    white-space: nowrap;
  }

  .reference-grid {
    grid-template-columns: 1fr;
  }

  .reference-card img {
    height: auto;
  }

  .legal-content {
    padding: 0;
  }

  .legal-content p,
  .legal-content li {
    font-size: 14px;
  }


  .legal-bar .page-wrap {
    padding-inline: 8px;
  }


  .cookie-settings-slot,
  .cookie-settings-button {
    width: 21px;
    height: 21px;
  }


  .cookie-consent {
    right: 12px;
    bottom: 14px;
    left: 12px;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 13px;
    border-radius: 16px;
  }

  .cookie-consent__actions {
    width: 100%;
  }

  .cookie-consent__button {
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
  }
}


@media (prefers-reduced-motion: reduce) {
  /* Accessibility tokens are inherited by every authored transition and animation.
     Their normal-mode fallbacks remain unchanged in the component declarations. */
  :root {
    --foehre-motion-time: 0.01ms;
    --foehre-motion-repeat: 1;
    --foehre-motion-scroll: auto;
  }

  /* Non-component animations (including future additions) default to minimal motion.
     Component durations use the tokens above, so no priority overrides are needed. */
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }


  body:not(.intro-active) .about-status {
    animation:none;
  }
}

/* ── [RASTER] Desktop-Container und Referenzübersicht ── */
@media (min-width: 981px) {
  /* Gemeinsames 1.200-px-Inhaltsraster mit seitlichem Abstand. */
  .container {
    width: min(calc(100% - 280px), 1200px);
    max-width: 1200px;
  }

  


  /* Referenzraster mit drei Spalten auf großen Bildschirmen. */
  .references-page .content {
    padding-top: 16px;
    padding-bottom: var(--content-footer-gap);
  }

  .references-page .filters {
    margin-bottom: 34px;
  }

  .references-page .filter-rows {
    gap: 8px;
  }

  .references-page .reference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .references-page .reference-card img {
    height: auto;
  }
}


@media (min-width: 769px) and (max-width: 1200px) {
  .references-page .reference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Abstand zwischen Seiteninhalt und Footer. */
.about-main,
.references-page .content {
  padding-bottom: var(--content-footer-gap);
}


@media (max-width: 820px) {
  :root {
    --content-footer-gap: 22px;
  }
}

/* Angaben unterhalb der Referenzbilder. */
.reference-card .reference-location,
.reference-card .reference-services,
.reference-card .reference-credit {
  margin: 0;
  color: var(--brand-text);
}
.reference-card .reference-location {
  padding: 0 16px 6px;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: var(--foehre-weight-medium);
}
.reference-card .reference-services {
  padding: 0 16px 10px;
  font-size: 13px;
  line-height: 1.42;
}
.reference-card .reference-credit {
  margin-top: auto;
  padding: 0 16px 17px;
  font-size: 12.5px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--foehre-color-green) 78%, transparent);
}
.reference-card .reference-credit a {
  color: var(--brand-orange);
  font-weight: var(--foehre-weight-medium);
  text-decoration: none;
}
.reference-card .reference-credit a:hover,
.reference-card .reference-credit a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── [BIBLIOTHEK] Bibliothek und Fachartikel ── */


.library-page .library-main {
  width: 100%;
  padding: 0 0 var(--content-footer-gap);
}

/* ── [BIBLIOTHEK] Bibliothek – Inhalt, Navigation und Seitenspalten ── */
.library-shell {
  width: min(calc(100% - 280px), 1200px);
  min-height: calc(100svh - var(--header-height));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
  overflow: visible;
  background: color-mix(in srgb, var(--foehre-color-paper) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--foehre-color-green) 10%, transparent);
  box-shadow: 0 12px 30px var(--shadow);
}

.library-sidebar {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100svh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 30px 22px 42px;
  border-right: 1px solid color-mix(in srgb, var(--foehre-color-green) 12%, transparent);
  background: color-mix(in srgb, var(--foehre-color-paper) 99%, transparent);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--foehre-color-green) 38%, transparent) transparent;
  transition:top var(--foehre-motion-time, 220ms) ease, height var(--foehre-motion-time, 220ms) ease;
}

body.has-scrolled .library-sidebar {
  top: var(--header-height-scrolled);
  height: calc(100svh - var(--header-height-scrolled));
}

.library-sidebar::-webkit-scrollbar {
  width: 7px;
}

.library-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--foehre-color-green) 32%, transparent);
}

.library-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.library-sidebar-title {
  margin: 0;
  color: var(--brand-orange);
  font-size: 18px;
  line-height: 1.2;
  font-weight: var(--foehre-weight-medium);
}

.library-sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--foehre-color-green) 16%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--brand-green);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.library-nav,
.library-nav-list {
  display: flex;
  flex-direction: column;
}


.library-mobile-toolbar,
.library-overlay {
  display: none;
}

.library-content {
  min-width: 0;
  padding: clamp(34px, 4.5vw, 64px) clamp(32px, 5.5vw, 78px) clamp(60px, 7vw, 96px);
}


.library-article {
  max-width: 860px;
}

.library-article h1 {
  margin: 0 0 14px;
  color: var(--brand-orange);
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08;
  font-weight: var(--foehre-weight-medium);
  letter-spacing: -0.02em;
}

.library-article .library-lead {
  max-width: 760px;
  margin: 0 0 30px;
  color: var(--brand-text);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  font-weight: var(--foehre-weight-light);
}

.library-article h2 {
  margin: 42px 0 12px;
  color: var(--brand-text);
  font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.2;
  font-weight: var(--foehre-weight-medium);
}

.library-article h3 {
  margin: 26px 0 8px;
  color: var(--brand-text);
  font-size: 17px;
  line-height: 1.3;
  font-weight: var(--foehre-weight-medium);
}

.library-article p,
.library-article li,
.library-article summary {
  color: var(--brand-text);
  font-size: 15.5px;
  line-height: 1.68;
}

.library-article p {
  margin: 0 0 16px;
}

.library-article ul,
.library-article ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.library-article li + li {
  margin-top: 6px;
}

.library-article a {
  color: var(--brand-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}


@media (max-width: 1100px) {
  .library-shell {
    width: min(calc(100% - 80px), 1100px);
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .library-content {
    padding-inline: clamp(28px, 4.5vw, 56px);
  }
}

@media (max-width: 820px) {
  .library-page .library-main {
    padding: 0 var(--page-pad) var(--content-footer-gap);
  }

  .library-shell {
    width: 100%;
    min-height: 0;
    display: block;
    border: 1px solid color-mix(in srgb, var(--foehre-color-green) 10%, transparent);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--foehre-color-green) 8%, transparent);
  }

  .library-mobile-toolbar {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 8px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--foehre-color-green) 11%, transparent);
    background: color-mix(in srgb, var(--foehre-color-paper) 98%, transparent);
  }

  .library-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border: 1px solid color-mix(in srgb, var(--foehre-color-green) 15%, transparent);
    border-radius: 999px;
    background: transparent;
    color: var(--brand-green);
    font-size: 13px;
    line-height: 1;
    font-weight: var(--foehre-weight-medium);
    cursor: pointer;
  }

  .library-mobile-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    width: 14px;
  }

  .library-mobile-toggle-icon span {
    display: block;
    width: 14px;
    height: 1px;
    background: currentColor;
  }

  .library-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    z-index: 998;
    width: min(86vw, 320px);
    height: auto;
    padding: 25px 20px 38px;
    visibility: hidden;
    transition:top var(--foehre-motion-time, 220ms) ease, transform var(--foehre-motion-time, 220ms) ease, visibility var(--foehre-motion-time, 220ms) ease;
  }

  body.has-scrolled .library-sidebar {
    top: var(--header-height-scrolled);
    height: auto;
  }

  .library-sidebar.is-open {
    
    visibility: visible;
  }

  .library-sidebar-close {
    display: inline-flex;
  }

  .library-overlay {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 997;
    display: block;
    border: 0;
    background: color-mix(in srgb, var(--foehre-color-green) 28%, transparent);
  }

  body.has-scrolled .library-overlay {
    inset-block-start: var(--header-height-scrolled);
  }

  .library-overlay[hidden] {
    display: none;
  }

  body.library-menu-open {
    overflow: hidden;
  }

  .library-content {
    padding: 30px clamp(20px, 5vw, 38px) 58px;
  }

  .library-article {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .library-content {
    padding: 26px 18px 48px;
  }


  .library-article h1 {
    font-size: clamp(27px, 9vw, 38px);
  }

  .library-article .library-lead {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.55;
  }

  .library-article h2 {
    margin-top: 34px;
    font-size: 21px;
  }

  .library-article p,
  .library-article li,
  .library-article summary {
    font-size: 14.5px;
    line-height: 1.62;
  }


}

.library-nav-topics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
}

.library-nav-topic {
  margin: 0;
}

.library-nav-topic-link {
  position: relative;
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 13px;
  border-radius: 12px;
  color: var(--brand-text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: var(--foehre-weight-medium);
  text-decoration: none;
  transition:background-color var(--foehre-motion-time, 150ms) ease, color var(--foehre-motion-time, 150ms) ease;
}

.library-nav-topic-link::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.library-nav-topic-link::after {
  content: "›";
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--foehre-color-green) 58%, transparent);
  font-size: 18px;
  line-height: 1;
  transform-origin: center;
  transition:transform var(--foehre-motion-time, 150ms) ease, color var(--foehre-motion-time, 150ms) ease;
}

.library-nav-topic-link[data-expanded="true"]::after {
  transform: rotate(90deg);
}

.library-nav-topic-link:hover,
.library-nav-topic-link:focus-visible,
.library-nav-topic-link[data-expanded="true"] {
  background: color-mix(in srgb, var(--foehre-color-green) 7%, transparent);
  color: var(--brand-orange);
}

.library-nav-topic-link[aria-current="page"] {
  background: color-mix(in srgb, var(--foehre-color-orange) 9%, transparent);
  color: var(--brand-orange);
}

.library-nav-topic-link[aria-current="page"]::before {
  background: var(--brand-orange);
}

.library-nav-topic-link:hover::after,
.library-nav-topic-link:focus-visible::after,
.library-nav-topic-link[data-expanded="true"]::after {
  color: var(--brand-orange);
}

.library-nav-sublist {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 5px 0 0;
  padding: 0 0 0 14px;
  list-style: none;
}

.library-nav-sublink {
  position: relative;
  display: block;
  padding: 8px 10px 8px 17px;
  border-radius: 10px;
  color: var(--brand-text);
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: var(--foehre-weight-light);
  text-decoration: none;
  transition:background-color var(--foehre-motion-time, 150ms) ease, color var(--foehre-motion-time, 150ms) ease, font-weight var(--foehre-motion-time, 150ms) ease;
}

.library-nav-sublink::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--foehre-color-green) 32%, transparent);
  transform: translateY(-50%);
}

.library-nav-sublink:hover,
.library-nav-sublink:focus-visible {
  background: color-mix(in srgb, var(--foehre-color-green) 6%, transparent);
  color: var(--brand-orange);
}

.library-nav-sublink[aria-current="page"] {
  background: color-mix(in srgb, var(--foehre-color-orange) 9%, transparent);
  color: var(--brand-orange);
  font-weight: var(--foehre-weight-medium);
}

.library-nav-sublink[aria-current="page"]::before {
  background: var(--brand-orange);
}


/* Schriftfarben und aktive Interaktionszustände. */
.about-title,
.services-heading,
.legal-content h1,
.library-sidebar-title,
.library-article h1,
.library-fact strong {
  color: var(--brand-green);
}

.site-header-nav a:hover,
.site-header-nav a:focus-visible,
.site-language-selector a:hover,
.site-language-selector a:focus-visible {
  color: var(--brand-orange);
}

.site-mobile-nav a:hover,
.site-mobile-nav a:focus-visible,
.site-mobile-nav a[aria-current="page"] {
  color: var(--brand-orange);
  background: color-mix(in srgb, var(--foehre-color-paper) 96%, transparent);
}


@media (max-width: 820px) {
  .library-mobile-toolbar {
    justify-content: flex-end;
  }

  .library-mobile-toggle {
    margin-right: 0;
    margin-left: auto;
  }

  .library-sidebar {
    right: 0;
    left: auto;
    border-right: 0;
    border-left: 1px solid color-mix(in srgb, var(--foehre-color-green) 14%, transparent);
    box-shadow: -14px 18px 34px color-mix(in srgb, var(--foehre-color-green) 18%, transparent);
    transform: translateX(104%);
  }

  .library-sidebar.is-open {
    transform: translateX(0);
  }

  
}


/* --brand-text ist oben in den globalen Grundwerten definiert. */
body, p, li, dt, dd, address, summary, label, input, textarea, select, button { color: var(--foehre-color-black); }
h1, .about-title, .legal-content h1, .library-article h1 { color: var(--brand-orange); }
h2, h3, h4, h5, h6,
.service-card h3, .reference-card h3, .legal-content h2,
.library-article h2, .library-article h3,
.footer-heading, .library-sidebar-title, .library-fact strong { color: var(--brand-green); }


.site-header-nav a, .site-language-selector a, .site-mobile-nav a,
.footer-useful-links a, .footer-contact a, .legal-bar a,
.library-nav-link, .library-nav-topic-link, .library-nav-sublink,
.library-breadcrumbs, .library-breadcrumbs a, .library-article a,
.service-inline-link, .home-references-link { color: var(--foehre-color-black); }
a:hover, a:focus-visible,
.site-header-nav a:hover, .site-header-nav a:focus-visible,
.site-language-selector a:hover, .site-language-selector a:focus-visible,
.site-mobile-nav a:hover, .site-mobile-nav a:focus-visible,
.footer-useful-links a:hover, .footer-useful-links a:focus-visible,
.footer-contact a:hover, .footer-contact a:focus-visible,
.legal-bar a:hover, .legal-bar a:focus-visible,
.library-breadcrumbs a:hover, .library-breadcrumbs a:focus-visible,
.library-article a:hover, .library-article a:focus-visible,
.service-inline-link:hover, .service-inline-link:focus-visible,
.home-references-link:hover, .home-references-link:focus-visible,
.site-header-nav a[aria-current="page"], .site-language-selector a[aria-current="page"],
.site-mobile-nav a[aria-current="page"], .footer-useful-links a[aria-current="page"],
.legal-bar a[aria-current="page"], .library-nav-link[aria-current="page"],
.library-nav-topic-link[aria-current="page"], .library-nav-sublink[aria-current="page"],
.library-nav-topic-link[data-expanded="true"] { color: var(--brand-orange); }


