/* Background image scroll items */
.scroll-item[data-bg-image] {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.scroll-item[data-bg-image]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.18);
  z-index: 0;
}

/* Content wrapper for background items */
.scroll-item-content {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
}

/* Alternative overlay options via data attributes */
.scroll-item[data-overlay="light"]::before {
  background: rgba(255, 255, 255, 0.1);
}

.scroll-item[data-overlay="dark"]::before {
  background: rgba(0, 0, 0, 0.3);
}

.scroll-item[data-overlay="none"]::before {
  display: none;
}

/* Alternative content background options */
.scroll-item-content[data-content-bg="dark"] {
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-primary);
}

.scroll-item-content[data-content-bg="light"] {
  background: rgba(255, 255, 255, 0.9);
  color: var(--bg-primary);
}

.fact-box {
  padding: 3rem 2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.fact-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-blue) 100%);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.fact-box:hover {
  transform: translateY(-8px);
  border-color: var(--accent-green);
  background: var(--bg-secondary);
}

.fact-box:hover::before {
  transform: scaleX(1);
}

.fact-number {
  font-size: clamp(1.75rem, 5vmin + 3vw, 6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.fact-box p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-weight: 500;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.image-wrapper img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-wrapper:hover img {
  transform: scale(1.08);
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent-green);
  color: var(--bg-primary);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  border: 2px solid var(--accent-green);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-green-dark);
  transition: left var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(136, 206, 2, 0.3);
}

.btn:hover::before {
  left: 0;
}

.btn span {
  position: relative;
  z-index: 1;
}

/* p5.js canvas section */
.p5-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: max(2rem, var(--glass-nav-safe-top)) 2rem 2rem;
  background: var(--bg-primary);
}

.p5-holder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding: 1.2rem 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.p5-row-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.p5-row-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.p5-row-btn:hover {
  border-color: var(--accent-green);
}

.p5-row-btn.active {
  border-color: var(--accent-green);
  background: rgba(136, 206, 2, 0.15);
  color: var(--accent-green);
}

#p5-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ub-svg-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ub-svg-image {
  width: 100%;
  height: 100%;
  display: block;
}

/* SVG sections with zoom + text layout */
.svg-section .svg-inner,
.ub-svg-section .svg-inner,
.ub-svg-section .ub-svg-inner {
  width: 100%;
  /* max-width: 1280px; */
  margin: 0 auto;
  padding: 3rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.svg-section .svg-image,
.ub-svg-section .svg-image,
.ub-svg-section .ub-svg-image {
  width: 100%;
  height: auto;
  display: block;
}

.fullpage-slide.flow-slide {
  --flow-pad: 8.5rem;
  background-color: var(--bg-statistik-flow);
}

.fullpage-slide.flow-slide .bg:not(.slide-feature-layout) {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: max(var(--flow-pad), var(--glass-nav-safe-top));
  padding-inline: max(var(--flow-pad), min(20vw, 32rem));
  gap: 0.75rem;
}

.fullpage-slide.flow-slide .bg.flow-slide-layout {
  padding-top: max(var(--flow-pad), var(--glass-nav-safe-top));
  padding-bottom: max(var(--flow-pad), var(--fullpage-next-reserve));
  padding-inline: 0;
}

.fullpage-slide.flow-slide .flow-slide-body,
.fullpage-slide.sunburst-slide .flow-slide-body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 0;
}

.fullpage-slide.flow-slide .flow-slide-body {
  gap: calc(3rem + clamp(1.25rem, 2.25vmin, 2rem));
}

.fullpage-slide.flow-slide .flow-chart-area,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area {
  --flow-zoom: 1;
  --flow-zoom-bar-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  --flow-zoom-slot: calc(clamp(2.25rem, 13vmin, 5.25rem) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  flex: 1;
  min-height: 0;
  position: relative;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 0;
  box-sizing: border-box;
}

.fullpage-slide.flow-slide .flow-chart-area {
  --flow-chart-w: min(100%, 100dvw, 100dvh * 1190.55 / 605);
}

@media (min-width: 1080px) {
  .fullpage-slide.flow-slide .flow-chart-area {
    --flow-chart-w: min(
      100%,
      100dvw,
      calc(max(0px, 100dvh - calc(3rem + clamp(12.5rem, 14dvh + 11rem, 28rem))) * 1190.55 / 605)
    );
  }
}

.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area {
  --flow-chart-w: min(100%, 60rem);
}

.fullpage-slide.flow-slide .flow-chart-area.flow-chart-area--pending,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area.flow-chart-area--pending {
  overflow-y: hidden;
}

.fullpage-slide.flow-slide .flow-chart-area:not(.flow-chart-area--pending) .flow-scroll-slot,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area:not(.flow-chart-area--pending) .flow-scroll-slot {
  padding-bottom: calc(1.5rem + var(--flow-zoom-slot));
}

@keyframes flow-zoom-bar-slide-up {
  from {
    transform: translateY(calc(100% + var(--flow-zoom-bar-bottom) + 0.35rem));
  }
  to {
    transform: translateY(0);
  }
}

.fullpage-slide.flow-slide .flow-zoom-bar,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--flow-zoom-bar-bottom);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.45rem, 2vmin, 0.75rem);
  flex-shrink: 0;
  pointer-events: none;
}

.fullpage-slide.flow-slide .flow-zoom-bar .flow-zoom-btn,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-bar .flow-zoom-btn {
  pointer-events: auto;
}

.fullpage-slide.flow-slide .flow-chart-area:not(.flow-chart-area--pending) .flow-zoom-bar,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area:not(.flow-chart-area--pending) .flow-zoom-bar {
  animation: flow-zoom-bar-slide-up 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fullpage-slide.flow-slide .flow-chart-area.flow-chart-area--pending .flow-zoom-bar,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area.flow-chart-area--pending .flow-zoom-bar {
  animation: none;
  transform: translateY(calc(100% + var(--flow-zoom-bar-bottom) + 0.35rem));
}

@media (prefers-reduced-motion: reduce) {
  .fullpage-slide.flow-slide .flow-chart-area .flow-zoom-bar,
  .fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-bar {
    animation: none;
    transition: none;
  }

  .fullpage-slide.flow-slide .flow-chart-area.flow-chart-area--pending .flow-zoom-bar,
  .fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area.flow-chart-area--pending .flow-zoom-bar {
    transform: none;
    visibility: hidden;
  }
}

.fullpage-slide.sunburst-slide .sunburst-chart-area {
  --flow-chart-w: min(100%, 100dvw, 100dvh * 1190.55 / 841.89);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-height: 0;
  position: relative;
  width: 100%;
}

.fullpage-slide.sunburst-slide .sunburst-prerender {
  display: none;
}

@media (max-width: 1079px) {
  .fullpage-slide.sunburst-slide .flow-slide-body {
    gap: clamp(1.25rem, 3vmin, 2rem);
  }

  .fullpage-slide.sunburst-slide #sunburst-chart-main {
    display: none !important;
  }

  .fullpage-slide.sunburst-slide .sunburst-chart-area {
    align-items: center;
    width: 100%;
  }

  .fullpage-slide.sunburst-slide .sunburst-prerender {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    justify-content: flex-start;
    align-items: center;
    align-self: stretch;
    width: 100%;
    flex: 1;
    min-height: 0;
  }

  .fullpage-slide.sunburst-slide .sunburst-prerender__pane {
    display: flex;
    justify-content: center;
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
  }

  .fullpage-slide.sunburst-slide .sunburst-prerender__viewport {
    display: flex;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1366 / 768;
    min-height: 0;
  }

  .fullpage-slide.sunburst-slide .sunburst-prerender__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
  }
}

.fullpage-slide.sunburst-slide .sunburst-chart-area .sunburst-chartdiv {
  width: min(100%, var(--flow-chart-w));
  max-width: 100%;
}

.fullpage-slide.sunburst-slide .bg.slide-feature-layout .sunburst-chartdiv {
  width: min(100%, 60rem);
}

.fullpage-slide.sunburst-slide .bg.slide-feature-layout .flow-chart-area .sunburst-chartdiv {
  width: 100%;
  max-width: none;
}

.fullpage-slide.sunburst-slide .flow-chart-area .sunburst-chartdiv {
  flex: 0 1 auto;
  width: 100%;
  max-width: none;
}

.fullpage-slide.sunburst-slide .flow-chart-area .sunburst-chartdiv > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-inline: 0;
  object-fit: contain;
}

.fullpage-slide[data-figure-layout="fit"] .flow-chart-area .sunburst-chartdiv > img {
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  object-fit: contain;
}

.fullpage-slide.flow-slide .flow-zoom-btn,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn {
  --flow-zoom-tint: var(--section-title-tint, var(--fullpage-tint-statistik));
  box-sizing: border-box;
  width: clamp(calc(2.25rem - 1rem), 11vmin, calc(4rem - 1rem));
  height: clamp(calc(2.25rem - 1rem), 11vmin, calc(4rem - 1rem));
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: clamp(0.48rem, 0.14rem + 1.15vmin, 0.72rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--flow-zoom-tint);
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid var(--flow-zoom-tint);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fullpage-slide.flow-slide .flow-zoom-btn:hover,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn:hover {
  background: #fff;
}

.fullpage-slide.flow-slide .flow-zoom-btn.flow-zoom-btn--active,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn.flow-zoom-btn--active {
  color: var(--text-primary);
  background: var(--flow-zoom-tint);
  border-color: var(--flow-zoom-tint);
}

.fullpage-slide.flow-slide .flow-zoom-btn:disabled,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.fullpage-slide.flow-slide .flow-zoom-btn:disabled:hover,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.78);
  color: var(--flow-zoom-tint);
}

.fullpage-slide.flow-slide .flow-zoom-btn.flow-zoom-btn--active:disabled:hover,
.fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn.flow-zoom-btn--active:disabled:hover {
  color: var(--text-primary);
  background: var(--flow-zoom-tint);
}

@media (max-height: 700px) {
  .fullpage-slide.flow-slide .flow-zoom-btn,
  .fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area .flow-zoom-btn {
    width: clamp(calc(1.5rem - 1rem), 10vmin, calc(2.5rem - 1rem));
    height: clamp(calc(1.5rem - 1rem), 10vmin, calc(2.5rem - 1rem));
    font-size: clamp(0.42rem, 0.12rem + 1vmin, 0.65rem);
  }
}

/* Statistik line chart section (amCharts) */
.statistik-head {
  text-align: left;
  color: var(--text-primary);
  max-width: 720px;
}

.statistik-title {
  font-size: clamp(1.1rem, 2.5vmin + 1.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.2rem;
  color: var(--section-title-tint, inherit);
}

.statistik-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.85;
}

.statistik-chartdiv {
  width: 100%;
  max-width: 960px;
  height: min(480px, max(240px, 52dvh));
  margin-top: 1rem;
}

.statistik-holder {
  width: min(1100px, 95vw);
}

.fullpage-slide.sunburst-slide {
  --sunburst-pad: 8.5rem;
  min-height: 0;
  background-color: var(--bg-statistik-sunburst);
}

/* overflow:visible widens compositing layers during xPercent slide transitions (desktop only).
   On small screens .inner must stay scrollable (see statistik-edge-slide .inner). */
@media (min-width: 1080px) {
  .fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) .outer,
  .fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) .inner {
    overflow: visible;
  }
}

.fullpage-slide.sunburst-slide .bg:not(.slide-feature-layout):not(.sunburst-slide-layout) {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: max(var(--sunburst-pad), var(--glass-nav-safe-top));
  padding-bottom: max(var(--sunburst-pad), var(--fullpage-next-reserve));
  padding-inline: max(var(--sunburst-pad), min(20vw, 32rem));
  gap: 0.75rem;
}

.fullpage-slide.sunburst-slide .bg.slide-feature-layout {
  padding-top: max(var(--sunburst-pad), var(--glass-nav-safe-top));
  padding-bottom: max(var(--sunburst-pad), var(--fullpage-next-reserve));
  padding-inline: 0;
}

.fullpage-slide.sunburst-slide .bg.sunburst-slide-layout {
  padding-top: max(var(--sunburst-pad), var(--glass-nav-safe-top));
  padding-bottom: max(var(--sunburst-pad), var(--fullpage-next-reserve));
  padding-inline: 0;
}

.sunburst-title {
  flex-shrink: 0;
  color: var(--section-title-tint, var(--Turquoise-4));
  font-family: "Source Sans Pro", sans-serif;
  font-size: clamp(1.2rem, 3.5vmin + 1.2vw + 0.2vh, 4.375rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.06;
  margin: 0;
}

.fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) ~ .fullpage-slide.sunburst-slide .bg.slide-feature-layout {
  padding-top: max(
    var(--glass-nav-safe-top),
    calc(max(var(--glass-nav-safe-top), clamp(3.25rem, 4vmin + 3vw, 8rem)) - 1rem)
  );
}

.fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) ~ .fullpage-slide.sunburst-slide .slide-feature-topnav {
  margin-bottom: clamp(0.25rem, 1vmin, 0.65rem);
}

.fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) ~ .fullpage-slide.sunburst-slide .sunburst-title {
  padding-top: clamp(0.1rem, 0.5vmin, 0.4rem);
  padding-bottom: clamp(1rem, 2.8vmin, 2.5rem);
}

.sunburst-chartdiv {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  stroke: var(--bg-primary);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--fullpage-tint-statistik) rgba(255, 255, 255, 0.4);
}

.sunburst-chartdiv::-webkit-scrollbar {
  width: 10px;
}

.sunburst-chartdiv::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 5px;
}

.sunburst-chartdiv::-webkit-scrollbar-thumb {
  background: var(--fullpage-tint-statistik);
  border-radius: 5px;
}

.statistik-chartdiv {
  width: 100%;
  max-width: 960px;
  height: min(480px, max(240px, 52dvh));
  margin-top: 1rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--fullpage-tint-statistik) rgba(255, 255, 255, 0.35);
}

.statistik-chartdiv::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.statistik-chartdiv::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 5px;
}

.statistik-chartdiv::-webkit-scrollbar-thumb {
  background: var(--fullpage-tint-statistik);
  border-radius: 5px;
}

.fullpage-slide.sunburst-slide .sunburst-chartdiv:has(> img) {
  box-sizing: border-box;
  padding-inline: clamp(1rem, 3.5vw, 3.25rem);
  padding-top: clamp(0.75rem, 2.5vmin, 1.75rem);
  padding-bottom: clamp(0.5rem, 1.5vmin, 1.25rem);
}

.fullpage-slide.sunburst-slide .sunburst-chartdiv > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.fullpage-slide[data-figure-layout="fit"] .sunburst-chartdiv {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullpage-slide[data-figure-layout="fit"] .sunburst-chartdiv > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullpage-slide[data-figure-layout="fit"] .sunburst-chartdiv > *:not(img) {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* ── Glass Top Navigation ───────────────────────────────────────── */
.glass-top-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translate3d(-50%, -1.25rem, 0);
  z-index: 1200;
  box-sizing: border-box;
  display: inline-flex;
  align-items: stretch;
  height: clamp(44px, 12vmin, 60px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 0px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 5px 2px rgba(0,0,0,0.05),
    0 -5px 2px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.28);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  padding: 0;
  max-width: var(--glass-nav-bar-max-width);
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease-out,
    transform 320ms cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-top-nav.glass-top-nav--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
}

.glass-top-nav.glass-top-nav--in-slide {
  position: absolute;
  z-index: 5;
}

.glass-top-nav.glass-top-nav--sticky {
  position: fixed;
  z-index: 1200;
}

.glass-top-nav__toggle {
  position: fixed;
  top: max(3.75rem, env(safe-area-inset-top));
  right: max(1.2rem, env(safe-area-inset-right));
  width: var(--glass-nav-toggle-size);
  height: var(--glass-nav-toggle-size);
  border-radius: 50%;
  border: none;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(217, 217, 217, 0.2);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  cursor: pointer;
  z-index: 1300;
}

.glass-top-nav__toggle-canvas {
  width: clamp(2.25rem, 10vmin, 3.875rem);
  height: clamp(2.25rem, 10vmin, 3.875rem);
  pointer-events: none;
  filter: brightness(0) invert(1);
}

.glass-top-nav__toggle:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.glass-top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 3.5vmin, 2.5rem);
  height: 100%;
  padding: 0;
  position: relative;
}

.glass-top-nav__active-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 0;
}

.glass-top-nav__item {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 clamp(4.5rem, 18vmin, 8.625rem);
  width: clamp(4.5rem, 18vmin, 8.625rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  background: transparent;
  color: #000;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 2.8vmin, 1.5rem);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background-color 150ms ease-out;
  z-index: 1;
}

.glass-top-nav__item:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.glass-top-nav__item--active {
  color: #000;
}

.glass-top-nav__item:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.glass-top-nav__icon {
  display: block;
  width: clamp(22px, 5vmin, 31px);
  height: clamp(20px, 4.5vmin, 28px);
  filter: brightness(0);
}

@media (max-width: 1079px) {
  .glass-top-nav {
    top: 0.75rem;
    height: auto;
    min-height: 0;
    padding: 0.2rem;
    transition: none;
  }

  .glass-top-nav__item {
    flex: 0 1 auto;
    width: 100%;
    max-width: 22rem;
    height: auto;
    min-height: 3.25rem;
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }

  .glass-top-nav__toggle {
    display: inline-flex;
  }

  .glass-top-nav__active-bg {
    display: none;
  }

  .glass-top-nav.glass-top-nav--visible {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, -0.5rem, 0);
  }

  body.glass-top-nav-menu-open .glass-top-nav.glass-top-nav--visible {
    opacity: 1;
    pointer-events: auto;
    position: fixed;
    inset: 0;
    transform: none;
    max-width: none;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    border-radius: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    box-sizing: border-box;
    overflow: hidden;
  }

  body.glass-top-nav-menu-open .glass-top-nav__inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    flex: 1 1 auto;
    gap: clamp(0.25rem, 1.5dvh, 1.25rem);
    min-height: 0;
    width: 100%;
    max-width: 22rem;
    max-height: 100%;
    padding: clamp(0.5rem, 2.5dvh, 2rem) 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.glass-top-nav-menu-open .glass-top-nav__item {
    flex: 0 0 auto;
    align-self: stretch;
    min-height: clamp(2.25rem, 9dvh, 3.25rem);
    height: auto;
    max-height: none;
    font-size: clamp(0.8rem, min(4.5dvh, 5vw), 1.75rem);
  }

  body.glass-top-nav-menu-open .glass-top-nav__icon {
    width: clamp(16px, min(5dvh, 6vmin), 31px);
    height: clamp(14px, min(4.5dvh, 5.5vmin), 28px);
  }
}

@media (max-width: 1079px) {
  .fullpage-slide.flow-slide {
    --flow-pad: clamp(1rem, 4vw, 2.25rem);
    display: none !important;
  }

  .fullpage-slide.sunburst-slide {
    --sunburst-pad: clamp(1rem, 4vw, 2.25rem);
  }

  .fullpage-slide.statistik-edge-slide {
    --statistik-edge-top-safe: var(--glass-nav-safe-top);
  }

  /* Same as template / slide-feature mobile: tall charts extend .bg; .inner scrolls */
  .fullpage-slide.statistik-edge-slide .inner {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-anchor: none;
    -webkit-overflow-scrolling: touch;
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide:has(.sunburst-slide-layout) .inner {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
    overscroll-behavior: contain;
  }

  .fullpage-slide.statistik-edge-slide .bg.slide-feature-layout,
  .fullpage-slide.statistik-edge-slide .bg.flow-slide-layout,
  .fullpage-slide.statistik-edge-slide .bg.sunburst-slide-layout {
    grid-template-rows: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    padding-bottom: max(
      clamp(0.75rem, 2vmin, 2rem),
      calc(var(--fullpage-next-reserve) + clamp(0.35rem, 1.5vmin, 0.75rem))
    );
  }

  .fullpage-slide.flow-slide .bg:not(.slide-feature-layout):not(.flow-slide-layout),
  .fullpage-slide.flow-slide .bg.flow-slide-layout {
    padding-top: max(var(--flow-pad), var(--statistik-edge-top-safe));
  }

  .fullpage-slide.sunburst-slide .bg:not(.slide-feature-layout):not(.sunburst-slide-layout),
  .fullpage-slide.sunburst-slide .bg.slide-feature-layout,
  .fullpage-slide.sunburst-slide .bg.sunburst-slide-layout {
    padding-top: max(var(--sunburst-pad), var(--statistik-edge-top-safe));
  }

  .fullpage-slide.sunburst-slide:has(.sunburst-slide-layout) ~ .fullpage-slide.sunburst-slide .bg.slide-feature-layout {
    padding-top: max(
      var(--statistik-edge-top-safe),
      calc(max(var(--sunburst-pad), var(--statistik-edge-top-safe)) - 1rem)
    );
  }

  .fullpage-slide.statistik-edge-slide:not(.flow-slide):not(.sunburst-slide) .bg.slide-feature-layout {
    padding-top: max(var(--statistik-edge-top-safe), clamp(2rem, 4vmin + 2vw, 6rem));
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide .slide-feature-body:has(.slide-feature-topnav) > .sunburst-title {
    order: 1;
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide .slide-feature-body:has(.slide-feature-topnav) > .slide-feature-topnav {
    order: 2;
    margin-top: clamp(0.75rem, 2.5vmin, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide .slide-feature-body:has(.slide-feature-topnav)
    > :not(.slide-feature-topnav):not(.sunburst-title) {
    order: 3;
  }

  .fullpage-slide.statistik-edge-slide .sunburst-chartdiv {
    flex: 0 0 auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .fullpage-slide.statistik-edge-slide .sunburst-chart-area {
    flex: 0 0 auto;
    min-height: auto;
  }

  .fullpage-slide.statistik-edge-slide[data-figure-layout="fit"] .sunburst-chartdiv {
    display: block;
    overflow: visible;
  }

  .fullpage-slide.statistik-edge-slide[data-figure-layout="fit"] .sunburst-chartdiv > img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .fullpage-slide.statistik-edge-slide[data-figure-layout="fit"] .sunburst-chartdiv > *:not(img) {
    flex: unset;
    min-width: unset;
    min-height: unset;
    width: 100%;
    max-width: 100%;
    max-height: none;
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide .slide-feature-body .flow-chart-area:not(.flow-chart-area--pending) {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .fullpage-slide.statistik-edge-slide.sunburst-slide .slide-feature-body .flow-chart-area:not(.flow-chart-area--pending) .flow-pan-viewport {
    flex: 0 0 auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .statistik-edge-slide .statistik-chartdiv {
    height: auto;
    min-height: max(240px, 42dvh);
  }

  .svg-section .svg-inner,
  .ub-svg-section .svg-inner,
  .ub-svg-section .ub-svg-inner {
    padding: 1.75rem 4vw;
    gap: 1.5rem;
  }

  .fullpage-slide.sunburst-slide .sunburst-chartdiv > img {
    width: 90%;
    max-width: 90%;
    margin-inline: auto;
  }

  .fullpage-slide.sunburst-slide .flow-chart-area .sunburst-chartdiv > img {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  .fullpage-slide.sunburst-slide .slide-feature-body .flow-chart-area {
    --flow-chart-w: min(90%, 90dvw, 60rem);
  }

  .fullpage-slide.sunburst-slide .sunburst-chart-area {
    --flow-chart-w: min(90%, 90dvw, 100dvh * 1190.55 / 841.89);
  }
}

@media (max-height: 700px) and (max-width: 1079px) {
  .fullpage-slide.flow-slide .bg.flow-slide-layout {
    padding-top: max(env(safe-area-inset-top, 0px), clamp(0.35rem, 2vmin, 0.75rem));
  }
}

@media (max-height: 700px) {
  .fullpage-slide.flow-slide {
    --flow-pad: clamp(0.75rem, 2.5vmin, 1.75rem);
  }

  .fullpage-slide.flow-slide .flow-slide-body {
    gap: 0.75rem;
  }

  .fullpage-slide.sunburst-slide {
    --sunburst-pad: clamp(0.75rem, 2.5vmin, 1.75rem);
  }

  .statistik-chartdiv {
    height: min(380px, max(220px, 42dvh));
  }
}

@media (max-height: 700px) and (min-width: 1080px) {
  .fullpage-slide.flow-slide .sunburst-title {
    display: none;
  }
}

.fullpage-slide.slide-feature-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main),
.fullpage-slide.template-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main),
.fullpage-slide.flow-slide .bg.flow-slide-layout .flow-slide-body:has(> .fullpage-scroll-main),
.fullpage-slide.statistik-edge-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  padding-bottom: var(--fullpage-next-reserve);
  box-sizing: border-box;
}

.fullpage-slide.slide-feature-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main) > .fullpage-scroll-main,
.fullpage-slide.template-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main) > .fullpage-scroll-main,
.fullpage-slide.flow-slide .bg.flow-slide-layout .flow-slide-body:has(> .fullpage-scroll-main) > .fullpage-scroll-main,
.fullpage-slide.statistik-edge-slide .bg.slide-feature-layout .slide-feature-body:has(> .fullpage-scroll-main) > .fullpage-scroll-main {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

/* Compact: min top inset + vertical center — Statistik (after quote), Raum/Kultur/Service feature grids */
@media (max-width: 1079px) {
  #main-content .statistik-quote-slide ~ .statistik-edge-slide .bg.slide-feature-layout,
  #main-content .statistik-quote-slide ~ .statistik-edge-slide .bg.flow-slide-layout,
  #main-content .statistik-quote-slide ~ .statistik-edge-slide .bg.sunburst-slide-layout,
  #main-content .slide-feature-slide .bg.slide-feature-layout {
    padding-top: max(4.5rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(clamp(0.75rem, 2vmin, 2rem), var(--fullpage-next-reserve));
  }

  #main-content .statistik-quote-slide ~ .statistik-edge-slide .slide-feature-body,
  #main-content .slide-feature-slide .slide-feature-body {
    justify-content: center;
  }

  #main-content .slide-feature-slide .slide-feature-body:has(.slide-feature-topnav) .slide-feature-stack {
    display: contents;
  }

  #main-content .slide-feature-slide .slide-feature-body:has(.slide-feature-topnav) .slide-feature-title {
    order: 1;
    width: 100%;
    max-width: 75.75rem;
  }

  #main-content .slide-feature-slide .slide-feature-body:has(.slide-feature-topnav) > .slide-feature-topnav {
    order: 2;
    margin-top: clamp(0.75rem, 2.5vmin, 1.5rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  }

  /* .slide-feature-row is display:contents here — media/copy are flex items and default order:0 would sit above the title */
  #main-content .slide-feature-slide .slide-feature-body:has(.slide-feature-topnav) .slide-feature-media,
  #main-content .slide-feature-slide .slide-feature-body:has(.slide-feature-topnav) .slide-feature-copy {
    order: 3;
    width: 100%;
    max-width: 75.75rem;
  }
}

