/* ==========================================================================
   MATE · Frosted-Aero Module & Marktplatz Layer (mate-modules-aero.css)
   Shared stylesheet for all 10 MATE module detail pages (mate-modul-*.html)
   and the 3-layer module showcase on mate-marktplatz.html.
   Built strictly on MATE Frosted UI / Modern Aero tokens (Light & Dark).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (LIGHT & DARK MODE PARITY, HIGH-CONTRAST SVG PALETTE)
   -------------------------------------------------------------------------- */
:root {
  --pui-t-main: #0B1120;
  --pui-t-muted: #42506B;
  --pui-surface: #FFFFFF;
  --pui-surface-alt: #F3F6FC;
  --pui-border: #CFD8E8;
  --pui-hairline: #E2E8F3;
  --pui-accent: #1B2ED6;
  --pui-accent-soft: #EEF2FF;
  --pui-ok: #0E6B45;
  --pui-ok-soft: #E8F7F0;
  --pui-ok-border: #86D1B0;
  --pui-warn: #7C4400;
  --pui-warn-soft: #FEF5E6;
  --pui-warn-border: #E5B66E;

  --mod-sheet-bg: linear-gradient(
    142deg,
    rgba(254, 255, 255, 0.94) 0%,
    rgba(246, 250, 255, 0.90) 56%,
    rgba(238, 244, 255, 0.93) 100%
  );
  --mod-card-bg: rgba(255, 255, 255, 0.86);
  --mod-card-hover-bg: rgba(255, 255, 255, 0.96);
  --mod-limits-bg: linear-gradient(
    160deg,
    rgba(255, 251, 244, 0.90) 0%,
    rgba(248, 246, 242, 0.86) 100%
  );
  --mod-limits-border: rgba(168, 121, 56, 0.30);
  --mod-pill-bg: rgba(255, 255, 255, 0.88);
  --mod-pill-border: rgba(70, 88, 132, 0.24);
  --mod-pill-text: #1B2438;
  --mod-spec-top-line: rgba(27, 46, 214, 0.52);
}

:root[data-theme="dunkel"] {
  --pui-t-main: #F5F7FC;
  --pui-t-muted: #B8C4DE;
  --pui-surface: #111B31;
  --pui-surface-alt: #172440;
  --pui-border: #2F4063;
  --pui-hairline: #233250;
  --pui-accent: #8B9BFF;
  --pui-accent-soft: #1B2A57;
  --pui-ok: #7CE8B9;
  --pui-ok-soft: #102B27;
  --pui-ok-border: #2F6E59;
  --pui-warn: #FCD385;
  --pui-warn-soft: #2B2113;
  --pui-warn-border: #7A5A22;

  --mod-sheet-bg: linear-gradient(
    142deg,
    rgba(16, 26, 48, 0.94) 0%,
    rgba(11, 19, 36, 0.91) 56%,
    rgba(18, 29, 55, 0.94) 100%
  );
  --mod-card-bg: rgba(20, 31, 56, 0.84);
  --mod-card-hover-bg: rgba(26, 39, 70, 0.94);
  --mod-limits-bg: linear-gradient(
    160deg,
    rgba(34, 28, 22, 0.84) 0%,
    rgba(22, 26, 40, 0.88) 100%
  );
  --mod-limits-border: rgba(234, 182, 106, 0.32);
  --mod-pill-bg: rgba(20, 31, 56, 0.88);
  --mod-pill-border: rgba(181, 187, 208, 0.26);
  --mod-pill-text: #E9EEF9;
  --mod-spec-top-line: rgba(139, 155, 255, 0.56);
}

/* --------------------------------------------------------------------------
   2. LIGHTWEIGHT FROST-AERO AMBIENT BACKDROP (.subpage-aero-lite)
   Used on Mobile / Reduced-Motion / Save-Data subpages when WebGL is skipped.
   Works whether placed on .aero-world-stage, body, or a hero section.
   -------------------------------------------------------------------------- */
.aero-world-stage.subpage-aero-lite,
.subpage-aero-lite {
  background:
    radial-gradient(ellipse 68% 48% at 86% 12%, rgba(27, 46, 214, 0.14), transparent 62%),
    radial-gradient(ellipse 52% 44% at 12% 24%, rgba(255, 255, 255, 0.88), transparent 58%),
    radial-gradient(ellipse 60% 48% at 52% 88%, rgba(125, 140, 255, 0.11), transparent 64%),
    var(--frost-canvas, #EDF1F8);
}

:root[data-theme="dunkel"] .aero-world-stage.subpage-aero-lite,
:root[data-theme="dunkel"] .subpage-aero-lite {
  background:
    radial-gradient(ellipse 68% 48% at 86% 12%, rgba(90, 112, 240, 0.20), transparent 62%),
    radial-gradient(ellipse 52% 44% at 12% 24%, rgba(38, 55, 92, 0.42), transparent 58%),
    radial-gradient(ellipse 60% 48% at 52% 88%, rgba(27, 46, 214, 0.14), transparent 64%),
    var(--frost-canvas, #070D19);
}

.aero-world-stage.subpage-aero-lite::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.34) 0%, transparent 44%),
    radial-gradient(circle at 78% 18%, rgba(141, 155, 255, 0.18), transparent 34%);
}

:root[data-theme="dunkel"] .aero-world-stage.subpage-aero-lite::before {
  background:
    linear-gradient(155deg, rgba(125, 140, 255, 0.08) 0%, transparent 44%),
    radial-gradient(circle at 78% 18%, rgba(125, 140, 255, 0.14), transparent 36%);
}

/* --------------------------------------------------------------------------
   3. SHARED FROSTED SECTION SHEETS & SECTION HEADINGS (MODULE + MARKTPLATZ)
   -------------------------------------------------------------------------- */
body.mx-module main > .section {
  padding-block: clamp(30px, 4.2vw, 52px);
}

body.mx-module main > .section.mod-hero {
  --pui-sec-canvas: transparent;
  padding-top: clamp(16px, 2.5vw, 28px);
  padding-bottom: clamp(30px, 4.2vw, 48px);
}

body.mx-module main > .section.section--white {
  --pui-sec-canvas: var(--pui-sec-white, #FFFFFF);
}

body.mx-module .aero-section-sheet,
body.mx-market .aero-section-sheet {
  padding: clamp(24px, 3.4vw, 44px);
  border: 1px solid var(--frost-border);
  border-bottom-color: var(--frost-edge);
  border-radius: var(--frost-radius, 26px);
  background: var(--mod-sheet-bg);
  box-shadow: var(--aero-card-shadow, var(--frost-shadow));
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  contain: layout style;
}

body.mx-module .aero-section-sheet > .section-heading,
body.mx-market .aero-section-sheet > .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.82fr);
  gap: clamp(16px, 3vw, 44px);
  align-items: end;
  margin: 0 0 clamp(24px, 3.2vw, 36px);
  padding: 0 0 clamp(18px, 2.4vw, 26px);
  border-bottom: 1px solid var(--frost-edge);
}

body.mx-module .aero-section-sheet > .section-heading h2,
body.mx-market .aero-section-sheet > .section-heading h2 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(1.65rem, 2.65vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--frost-text);
  text-wrap: balance;
}

body.mx-module .aero-section-sheet > .section-heading p,
body.mx-market .aero-section-sheet > .section-heading p {
  margin: 0;
  max-width: 48ch;
  font-size: 0.98rem;
  line-height: 1.58;
  color: var(--frost-muted);
}

/* --------------------------------------------------------------------------
   4. MODULE HERO & BREADCRUMB (.krumen, .mod-hero, .mod-hero-sheet, .mod-hero-grid)
   -------------------------------------------------------------------------- */
body.mx-module .krumen,
body.mx-market .krumen {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
}

body.mx-module .krumen ol,
body.mx-market .krumen ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
}

body.mx-module .krumen li,
body.mx-market .krumen li {
  display: inline-flex;
  align-items: center;
}

.mod-hero-sheet {
  position: relative;
  overflow: hidden;
}

.mod-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 44px);
  align-items: center;
}

@media (min-width: 980px) {
  .mod-hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  }
}

.mod-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.mod-hero-copy .subpage-stone-origin {
  width: 100%;
  margin-bottom: 16px;
}

.mod-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.mod-layer-pill,
.mod-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.mod-layer-pill {
  border: 1px solid var(--mod-pill-border);
  background: var(--mod-pill-bg);
  color: var(--mod-pill-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

:root[data-theme="dunkel"] .mod-layer-pill {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mod-status-pill {
  border: 1px solid var(--pui-ok-border);
  background: var(--pui-ok-soft);
  color: var(--pui-ok);
}

.mod-status-pill--pilot {
  border-color: var(--pui-warn-border);
  background: var(--pui-warn-soft);
  color: var(--pui-warn);
}

.mod-hero-copy h1 {
  margin: 0 0 16px;
  max-width: 18ch;
  font-size: clamp(1.95rem, 3.3vw, 2.95rem);
  line-height: 1.07;
  letter-spacing: -0.032em;
  color: var(--frost-text);
  text-wrap: balance;
}

.mod-hero-copy .lead {
  margin: 0 0 22px;
  max-width: 52ch;
  font-size: clamp(1rem, 1.18vw, 1.12rem);
  line-height: 1.62;
  color: var(--frost-muted);
}

.mod-hero-copy .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 24px;
}

body.mx-module .mod-hero-copy .actions .btn,
body.mx-market .mod-hero-copy .actions .btn,
body.mx-module .aero-secondary-btn,
body.mx-market .aero-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.005em;
  text-transform: none;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

body.mx-module .btn--ghost,
body.mx-market .btn--ghost,
body.mx-module .aero-secondary-btn,
body.mx-market .aero-secondary-btn {
  border: 1px solid var(--mod-pill-border);
  background: var(--mod-pill-bg);
  color: var(--frost-text);
  box-shadow: var(--frost-shadow-small), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.mx-module .btn--ghost:hover,
body.mx-market .btn--ghost:hover,
body.mx-module .aero-secondary-btn:hover,
body.mx-market .aero-secondary-btn:hover {
  border-color: var(--frost-accent);
  background: var(--mod-card-hover-bg);
  color: var(--frost-accent);
  transform: translateY(-1px);
}

:root[data-theme="dunkel"] body.mx-module .btn--ghost,
:root[data-theme="dunkel"] body.mx-market .btn--ghost,
:root[data-theme="dunkel"] body.mx-module .aero-secondary-btn,
:root[data-theme="dunkel"] body.mx-market .aero-secondary-btn {
  border-color: rgba(143, 160, 255, 0.36);
  background: rgba(20, 32, 58, 0.82);
  color: #F5F7FC;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

:root[data-theme="dunkel"] body.mx-module .btn--ghost:hover,
:root[data-theme="dunkel"] body.mx-market .btn--ghost:hover,
:root[data-theme="dunkel"] body.mx-module .aero-secondary-btn:hover,
:root[data-theme="dunkel"] body.mx-market .aero-secondary-btn:hover {
  border-color: #8FA0FF;
  background: rgba(34, 52, 92, 0.92);
  color: #FFFFFF;
  transform: translateY(-1px);
}

body.mx-module .btn--ghost:focus-visible,
body.mx-market .btn--ghost:focus-visible,
body.mx-module .aero-secondary-btn:focus-visible,
body.mx-market .aero-secondary-btn:focus-visible {
  outline: 2px solid var(--frost-accent);
  outline-offset: 3px;
}

/* 3-Column Hairline Facts Strip (.mod-facts) */
.mod-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--frost-edge);
  gap: 14px 0;
}

.mod-facts > div {
  min-width: 0;
  padding-inline: 14px;
  border-left: 1px solid var(--frost-edge);
}

.mod-facts > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.mod-facts > div:last-child {
  padding-right: 0;
}

.mod-facts strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--frost-text);
  font-variant-numeric: tabular-nums;
}

.mod-facts span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.42;
  color: var(--frost-muted);
}

/* --------------------------------------------------------------------------
   5. HERO PRODUCT-UI SVG STUDIO WINDOW (.mod-hero-visual, .mod-hero-svg)
   -------------------------------------------------------------------------- */
.mod-hero-visual {
  min-width: 0;
  width: 100%;
}

.mod-hero-visual .pui-svg-window {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--pui-border);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--pui-surface);
  box-shadow: var(--aero-soft-shadow, var(--frost-shadow-small));
  overflow: hidden;
}

.mod-hero-visual .pui-svg-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pui-hairline);
  background: var(--pui-surface-alt);
  color: var(--pui-t-muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.mod-hero-visual .pui-svg-chrome-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mod-hero-visual .pui-svg-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.mod-hero-visual .pui-svg-dots i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pui-border);
}

.mod-hero-visual .pui-svg-dots i:first-child {
  background: var(--pui-accent);
  opacity: 0.78;
}

.mod-hero-visual .pui-svg-title {
  color: var(--pui-t-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mod-hero-visual .pui-svg-badge {
  flex: none;
  padding: 2px 8px;
  border: 1px solid var(--pui-border);
  border-radius: 999px;
  background: var(--pui-surface);
  color: var(--pui-accent);
  font-size: 0.72rem;
  font-weight: 650;
}

.mod-hero-svg {
  --pui-frame-bg: var(--pui-surface);
  --pui-surface-bg: var(--pui-surface-alt);
  --pui-tile-bg: var(--pui-surface);
  --pui-stroke: var(--pui-border);
  --pui-ink: var(--pui-t-main);
  --pui-muted: var(--pui-t-muted);
  --pui-ultra: var(--pui-accent);
  --pui-brand: var(--pui-accent);
  --pui-bar-track: var(--pui-hairline);

  display: block;
  width: 100%;
  height: auto;
  background: var(--pui-surface);
  font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.mod-hero-svg text {
  font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
}

.mod-hero-visual .pui-svg-foot {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--pui-hairline);
  background: var(--pui-surface-alt);
  color: var(--pui-t-muted);
  font-size: 0.77rem;
  line-height: 1.35;
}

.mod-hero-visual .pui-svg-foot-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.mod-hero-visual .pui-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 9px;
  border: 1px solid var(--pui-hairline);
  border-radius: 6px;
  background: var(--pui-surface);
  color: var(--pui-t-main);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.mod-hero-visual .pui-svg-foot-meta {
  min-width: 0;
  color: var(--pui-t-muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-hero-visual .pui-pause-btn {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 30px;
  min-inline-size: 58px;
  padding: 4px 10px;
  border: 1px solid var(--pui-border);
  border-radius: 6px;
  background: var(--pui-surface);
  color: var(--pui-t-main);
  font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.mod-hero-visual .pui-pause-btn:hover:not(:disabled),
.mod-hero-visual .pui-pause-btn[aria-pressed="true"] {
  border-color: var(--pui-accent);
  background: var(--pui-accent-soft);
  color: var(--pui-accent);
}

.mod-hero-visual .pui-pause-btn:focus-visible {
  outline: 2px solid var(--pui-accent);
  outline-offset: 2px;
}

.mod-hero-visual .pui-svg-foot strong {
  color: var(--pui-t-main);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   5b. MODULE HERO SVG WORKFLOW ANIMATIONS (6.8s–7.4s CALM SEQUENTIAL FLOWS)
   -------------------------------------------------------------------------- */
.mod-hero-svg {
  --mod-dur: 7.2s;
}

.mod-hero-svg--edi,
.mod-hero-svg--webdesign {
  --mod-dur: 7.0s;
}

.mod-hero-svg--itscope {
  --mod-dur: 6.8s;
}

.mod-hero-svg--robotik {
  --mod-dur: 7.4s;
}

.mod-hero-svg .mod-track {
  fill: none;
  stroke: var(--pui-border);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.72;
  pointer-events: none;
}

.mod-hero-svg .mod-trace {
  fill: none;
  stroke: var(--pui-accent);
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 24 76;
  stroke-dashoffset: 0;
  opacity: 0.52;
  pointer-events: none;
}

.mod-hero-svg .mod-trace--ok {
  stroke: var(--pui-ok);
}

.mod-hero-svg .mod-trace--warn {
  stroke: var(--pui-warn);
}

.mod-hero-svg .mod-trace--short {
  stroke-dasharray: 44 56;
}

.mod-hero-svg .mod-hl {
  fill: none;
  stroke: var(--pui-accent);
  stroke-width: 1.75;
  opacity: 0;
  pointer-events: none;
}

.mod-hero-svg .mod-hl--ok {
  stroke: var(--pui-ok);
}

.mod-hero-svg .mod-hl--warn {
  stroke: var(--pui-warn);
}

.mod-hero-svg .mod-pulse-ring {
  fill: none;
  stroke: var(--pui-ok);
  stroke-width: 1.3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

.mod-hero-svg .mod-pulse-ring--accent {
  stroke: var(--pui-accent);
}

.mod-hero-svg .mod-meter-track {
  fill: none;
  stroke: var(--pui-hairline);
  stroke-width: 2.4;
  stroke-linecap: round;
  pointer-events: none;
}

.mod-hero-svg .mod-meter-fill {
  fill: none;
  stroke: var(--pui-ok);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 8;
  pointer-events: none;
}

.mod-hero-svg .mod-meter-fill--accent {
  stroke: var(--pui-accent);
}

.mod-hero-svg .mod-bar-breath {
  transform-box: fill-box;
  transform-origin: left center;
}

.mod-hero-svg .mod-rule-sweep {
  fill: none;
  stroke: var(--pui-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  opacity: 0.72;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes modTracePhase1 {
    0%, 4% {
      stroke-dashoffset: 100;
      opacity: 0.14;
    }
    12% {
      opacity: 0.96;
    }
    38% {
      stroke-dashoffset: -24;
      opacity: 0.96;
    }
    48%, 100% {
      stroke-dashoffset: -24;
      opacity: 0.14;
    }
  }

  @keyframes modTracePhase2 {
    0%, 30% {
      stroke-dashoffset: 100;
      opacity: 0.14;
    }
    38% {
      opacity: 0.96;
    }
    66% {
      stroke-dashoffset: -24;
      opacity: 0.96;
    }
    76%, 100% {
      stroke-dashoffset: -24;
      opacity: 0.14;
    }
  }

  @keyframes modTracePhase3 {
    0%, 58% {
      stroke-dashoffset: 100;
      opacity: 0.14;
    }
    66% {
      opacity: 0.96;
    }
    90% {
      stroke-dashoffset: -24;
      opacity: 0.96;
    }
    98%, 100% {
      stroke-dashoffset: -24;
      opacity: 0.14;
    }
  }

  @keyframes modTraceFull {
    0%, 5% {
      stroke-dashoffset: 100;
      opacity: 0.16;
    }
    13% {
      opacity: 0.95;
    }
    82% {
      stroke-dashoffset: -24;
      opacity: 0.95;
    }
    92%, 100% {
      stroke-dashoffset: -24;
      opacity: 0.16;
    }
  }

  @keyframes modStage1 {
    0% {
      opacity: 0.14;
    }
    8%, 22% {
      opacity: 1;
    }
    32%, 100% {
      opacity: 0.08;
    }
  }

  @keyframes modStage2 {
    0%, 22% {
      opacity: 0.08;
    }
    30%, 44% {
      opacity: 1;
    }
    54%, 100% {
      opacity: 0.08;
    }
  }

  @keyframes modStage2b {
    0%, 34% {
      opacity: 0.08;
    }
    42%, 56% {
      opacity: 1;
    }
    66%, 100% {
      opacity: 0.08;
    }
  }

  @keyframes modStage3 {
    0%, 46% {
      opacity: 0.08;
    }
    54%, 68% {
      opacity: 1;
    }
    78%, 100% {
      opacity: 0.08;
    }
  }

  @keyframes modStage3b {
    0%, 58% {
      opacity: 0.08;
    }
    66%, 80% {
      opacity: 1;
    }
    90%, 100% {
      opacity: 0.08;
    }
  }

  @keyframes modStage4 {
    0%, 68% {
      opacity: 0.08;
    }
    76%, 90% {
      opacity: 1;
    }
    98%, 100% {
      opacity: 0.14;
    }
  }

  @keyframes modLivePulse {
    0% {
      transform: scale(1);
      opacity: 0.64;
    }
    56% {
      transform: scale(2);
      opacity: 0;
    }
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

  @keyframes modMeterSweep {
    0%, 10% {
      stroke-dashoffset: 100;
      opacity: 0.32;
    }
    48%, 84% {
      stroke-dashoffset: 6;
      opacity: 1;
    }
    96%, 100% {
      stroke-dashoffset: 100;
      opacity: 0.32;
    }
  }

  @keyframes modBarBreath {
    0%, 14% {
      transform: scaleX(0.76);
      opacity: 0.84;
    }
    52%, 78% {
      transform: scaleX(1);
      opacity: 1;
    }
    96%, 100% {
      transform: scaleX(0.76);
      opacity: 0.84;
    }
  }

  .mod-hero-svg .mod-trace--p1 {
    animation: modTracePhase1 var(--mod-dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .mod-hero-svg .mod-trace--p2 {
    animation: modTracePhase2 var(--mod-dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .mod-hero-svg .mod-trace--p3 {
    animation: modTracePhase3 var(--mod-dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .mod-hero-svg .mod-trace--full {
    animation: modTraceFull var(--mod-dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .mod-hero-svg .mod-seq-1 {
    animation: modStage1 var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-seq-2 {
    animation: modStage2 var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-seq-2b {
    animation: modStage2b var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-seq-3 {
    animation: modStage3 var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-seq-3b {
    animation: modStage3b var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-seq-4 {
    animation: modStage4 var(--mod-dur) ease-in-out infinite;
  }

  .mod-hero-svg .mod-pulse-ring {
    animation: modLivePulse 3.6s ease-out infinite;
  }

  .mod-hero-svg .mod-meter-fill,
  .mod-hero-svg .mod-rule-sweep {
    animation: modMeterSweep var(--mod-dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .mod-hero-svg .mod-meter-fill--d1 {
    animation-delay: -0.5s;
  }

  .mod-hero-svg .mod-meter-fill--d2 {
    animation-delay: -1.1s;
  }

  .mod-hero-svg .mod-meter-fill--d3 {
    animation-delay: -1.7s;
  }

  .mod-hero-svg .mod-bar-breath {
    animation: modBarBreath var(--mod-dur) ease-in-out infinite;
  }

  .platform-hero-teaser.is-paused *,
  .platform-hero-teaser.is-offscreen *,
  .mod-hero-visual.platform-hero-teaser.is-paused .mod-hero-svg *,
  .mod-hero-visual.platform-hero-teaser.is-offscreen .mod-hero-svg * {
    animation-play-state: paused;
  }
}

/* --------------------------------------------------------------------------
   6. CAPABILITY GRID (.mod-cap-grid, .mod-cap-card)
   -------------------------------------------------------------------------- */
.mod-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
}

.mod-cap-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mod-cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: clamp(20px, 2.4vw, 26px);
  border: 1px solid var(--frost-edge);
  border-top: 1px solid var(--mod-spec-top-line);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--mod-card-bg);
  box-shadow: var(--frost-shadow-small);
}

.mod-cap-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--frost-text);
}

.mod-cap-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--frost-muted);
}

.mod-cap-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--frost-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   7. ARCHITECTURE & HONEST BOUNDARIES (.mod-arch-split, .mod-spec-card)
   -------------------------------------------------------------------------- */
.mod-arch-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 28px);
  align-items: stretch;
}

.mod-spec-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(22px, 2.6vw, 30px);
  border: 1px solid var(--frost-edge);
  border-top: 1px solid var(--mod-spec-top-line);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--mod-card-bg);
  box-shadow: var(--frost-shadow-small);
}

.mod-spec-card--limits {
  border-color: var(--mod-limits-border);
  border-top-color: var(--pui-warn-border);
  background: var(--mod-limits-bg);
}

.mod-spec-card h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--frost-text);
}

.mod-spec-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--frost-muted);
}

.mod-spec-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.mod-spec-card li {
  position: relative;
  padding-left: 20px;
  font-size: 0.94rem;
  line-height: 1.56;
  color: var(--frost-text);
}

.mod-spec-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--frost-accent);
}

.mod-spec-card--limits li::before {
  background: var(--pui-warn);
}

.mod-spec-card li strong {
  font-weight: 650;
  color: var(--frost-text);
}

/* --------------------------------------------------------------------------
   8. CONNECTED 3D STONES (.mod-rel-grid, .mod-rel-card)
   -------------------------------------------------------------------------- */
.mod-rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.mod-rel-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 20px 22px;
  border: 1px solid var(--frost-edge);
  border-top-color: var(--frost-border);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--mod-card-bg);
  box-shadow: var(--frost-shadow-small);
  color: var(--frost-text);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mod-rel-card:hover {
  transform: translateY(-2px);
  border-color: var(--frost-accent);
  background: var(--mod-card-hover-bg);
  box-shadow: var(--aero-soft-shadow, var(--frost-shadow));
}

.mod-rel-card:focus-visible {
  outline: 2px solid var(--frost-accent);
  outline-offset: 3px;
}

.mod-rel-card small,
.mod-rel-card .mod-rel-coord {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--frost-accent);
  font-variant-numeric: tabular-nums;
}

.mod-rel-card strong,
.mod-rel-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.28;
  color: var(--frost-text);
}

.mod-rel-card span,
.mod-rel-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.54;
  color: var(--frost-muted);
}

/* --------------------------------------------------------------------------
   9. FAQ ACCORDION & CONTACT ACTIONS INSIDE MODULE PAGES
   -------------------------------------------------------------------------- */
body.mx-module .faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(24px, 3.6vw, 48px);
  align-items: start;
}

body.mx-module .faq-grid > div:first-child h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.026em;
  color: var(--frost-text);
}

body.mx-module .faq-grid > div:first-child p {
  margin: 0;
  color: var(--frost-muted);
  font-size: 0.96rem;
  line-height: 1.58;
}

body.mx-module .faq-list {
  display: grid;
  gap: 12px;
}

body.mx-module .faq-list details {
  border: 1px solid var(--frost-edge);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--mod-card-bg);
  box-shadow: var(--frost-shadow-small);
  overflow: hidden;
  transition: border-color 160ms ease, background-color 160ms ease;
}

body.mx-module .faq-list details[open] {
  border-color: var(--frost-accent);
  background: var(--mod-card-hover-bg);
}

body.mx-module .faq-list summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--frost-text);
}

body.mx-module .faq-list summary::-webkit-details-marker {
  display: none;
}

body.mx-module .faq-list summary::after {
  content: "+";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--frost-edge);
  color: var(--frost-accent);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
}

body.mx-module .faq-list details[open] summary::after {
  content: "−";
  border-color: var(--frost-accent);
}

body.mx-module .faq-list details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--frost-muted);
  max-width: 66ch;
}

/* Booking CTA & Form Status States inside Contact Sheet on Module Pages */
.btn-booking[hidden],
.aero-contact-sheet .form-actions-row .btn-booking[hidden] {
  display: none;
}

.aero-contact-sheet .form-actions-row .btn-booking:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 220px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid rgba(196, 208, 245, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #F5F7FC;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.aero-contact-sheet .form-actions-row .btn-booking:not([hidden]):hover {
  border-color: rgba(224, 232, 255, 0.78);
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.aero-contact-sheet .form-status.is-sending {
  color: #C7D4FF;
}

.aero-contact-sheet .form-status.is-success {
  padding: 10px 14px;
  border: 1px solid rgba(124, 232, 185, 0.42);
  border-radius: 12px;
  background: rgba(16, 43, 39, 0.65);
  color: #B4F5D8;
}

.aero-contact-sheet .form-status.is-error {
  padding: 10px 14px;
  border: 1px solid rgba(252, 211, 133, 0.46);
  border-radius: 12px;
  background: rgba(43, 33, 19, 0.68);
  color: #FDE4B2;
}

/* --------------------------------------------------------------------------
   10. MARKTPLATZ 3-LAYER MODULE SHOWCASE (.mp-layer-group, .mp-mod-grid, .mp-mod-card)
   -------------------------------------------------------------------------- */
.mp-layer-group {
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--frost-border);
  border-bottom-color: var(--frost-edge);
  border-radius: var(--frost-radius, 26px);
  background: var(--mod-sheet-bg);
  box-shadow: var(--aero-soft-shadow, var(--frost-shadow-small));
}

.mp-layer-group:first-of-type {
  margin-top: clamp(20px, 2.8vw, 32px);
}

.mp-layer-group > header,
.mp-layer-group .mp-layer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: clamp(18px, 2.4vw, 26px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--frost-edge);
}

.mp-layer-group h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.022em;
  color: var(--frost-text);
}

.mp-layer-group > p,
.mp-layer-group .mp-layer-head p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--frost-muted);
  max-width: 56ch;
}

.mp-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(275px, 100%), 1fr));
  gap: clamp(16px, 2.2vw, 22px);
}

.mp-mod-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: clamp(20px, 2.4vw, 24px);
  border: 1px solid var(--frost-edge);
  border-top: 1px solid var(--mod-spec-top-line);
  border-radius: var(--frost-radius-small, 17px);
  background: var(--mod-card-bg);
  box-shadow: var(--frost-shadow-small);
  color: var(--frost-text);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.mp-mod-card:hover {
  transform: translateY(-2px);
  border-color: var(--frost-accent);
  background: var(--mod-card-hover-bg);
  box-shadow: var(--aero-soft-shadow, var(--frost-shadow));
}

.mp-mod-card:focus-visible,
.mp-mod-card a:focus-visible {
  outline: 2px solid var(--frost-accent);
  outline-offset: 3px;
}

.mp-mod-card h4,
.mp-mod-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.26;
  letter-spacing: -0.015em;
  color: var(--frost-text);
}

.mp-mod-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.56;
  color: var(--frost-muted);
}

.mp-mod-card .mp-mod-meta,
.mp-mod-card .mod-eyebrow-row {
  margin-bottom: 2px;
}

.mp-mod-card .mp-mod-cta,
.mp-mod-card > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--frost-accent);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE BREAKPOINTS (MOBILE ZERO-OVERFLOW & >=44PX TARGETS)
   -------------------------------------------------------------------------- */
@media (max-width: 979px) {
  .mod-cap-grid,
  .mod-cap-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.mx-module .faq-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 820px) {
  body.mx-module .aero-section-sheet > .section-heading,
  body.mx-market .aero-section-sheet > .section-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .mod-arch-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body.mx-module .aero-section-sheet,
  body.mx-market .aero-section-sheet,
  .mp-layer-group {
    padding: 20px 18px;
    border-radius: 20px;
  }

  .mod-cap-grid,
  .mod-cap-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .mod-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .mod-facts > div {
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--frost-edge);
  }

  .mod-facts > div:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .mod-hero-copy .actions {
    width: 100%;
  }

  .mod-hero-copy .actions .btn,
  .mod-hero-copy .actions .aero-secondary-btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   12. REDUCED MOTION & FORCED COLORS (HIGH-CONTRAST ACCESSIBILITY)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mod-rel-card,
  .mp-mod-card,
  body.mx-module .mod-hero-copy .actions .btn,
  body.mx-market .mod-hero-copy .actions .btn,
  body.mx-module .btn--ghost,
  body.mx-market .btn--ghost,
  body.mx-module .aero-secondary-btn,
  body.mx-market .aero-secondary-btn,
  body.mx-module .faq-list details,
  .aero-contact-sheet .form-actions-row .btn-booking {
    transition: none;
  }

  .mod-rel-card:hover,
  .mp-mod-card:hover,
  body.mx-module .btn--ghost:hover,
  body.mx-market .btn--ghost:hover,
  body.mx-module .aero-secondary-btn:hover,
  body.mx-market .aero-secondary-btn:hover {
    transform: none;
  }

  .mod-hero-visual .pui-pause-btn {
    display: none;
  }
}

@media (forced-colors: active) {
  body.mx-module .aero-section-sheet,
  body.mx-market .aero-section-sheet,
  .mod-cap-card,
  .mod-spec-card,
  .mod-spec-card--limits,
  .mod-rel-card,
  .mp-layer-group,
  .mp-mod-card,
  .mod-layer-pill,
  .mod-status-pill,
  .mod-status-pill--pilot,
  .mod-hero-visual .pui-svg-window,
  .mod-hero-visual .pui-pause-btn,
  body.mx-module .faq-list details {
    forced-color-adjust: auto;
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }

  .mod-rel-card:focus-visible,
  .mp-mod-card:focus-visible,
  .mod-hero-visual .pui-pause-btn:focus-visible,
  body.mx-module .faq-list summary:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
