/* Shared shell for every public page.
   The original files were fixed-size design canvases (1680px wide, fixed
   height, overflow hidden). Those two properties are relaxed here so the pages
   behave like documents once content grows. Everything else is untouched. */

html, body {
  margin: 0;
  background: #050914;
  color: #F2F6FA;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

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

a { color: #6DE3FF; text-decoration: none; }
a:hover { color: #a6efff; }

img { max-width: 100%; }

/* The page root emitted by every converted template. */
body > div[style*="position:relative"]:first-of-type {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}

/* Canvas pages were authored at a fixed 1680px. Scale down rather than
   reflow, so the composition stays exactly as designed. */
.mb-canvas { width: 1680px; transform-origin: top center; }

/* Dropdown panels: the runtime toggled inline styles, now a class does it. */
.mb-menu-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, 0) !important;
}

/* Actor detail overlays, rendered server-side and toggled client-side. */
.mb-overlay { display: none; }
.mb-overlay.mb-overlay-open { display: block; }

/* Feed-driven blog list */
.mb-post-list { display: grid; gap: 18px; }

.mb-flash {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  padding: 12px 22px; border-radius: 10px; z-index: 200;
  background: rgba(9, 19, 34, .96); border: 1px solid rgba(109, 227, 255, .3);
  font-size: 14px; color: #E4EAF1; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------ newsletter popup
   Eigenes Styling statt der Canvas-Inline-Styles: das Popup gehört keiner
   der acht Seiten, es liegt im Basis-Template und muss auf jeder Breite
   funktionieren. Ab 640px wird aus dem zentrierten Dialog ein Sheet, das von
   unten kommt -- auf dem Handy ist das die Geste, die man erwartet, und der
   Daumen erreicht den Knopf. */
.mb-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.mb-modal[hidden] { display: none; }

.mb-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 7, 16, .78);
  backdrop-filter: blur(3px);
  animation: mb-modal-fade .18s ease;
}

.mb-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 34px 34px 30px;
  border-radius: 18px;
  border: 1px solid rgba(109, 227, 255, .18);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(44, 75, 196, .28), transparent 70%),
    #070d1a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  animation: mb-modal-rise .22s cubic-bezier(.2, .7, .3, 1);
}

.mb-modal-x {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 9px; cursor: pointer;
  background: rgba(109, 227, 255, .06);
  border: 1px solid rgba(109, 227, 255, .16);
  color: #A2AFBE;
  transition: background .18s ease, color .18s ease;
}
.mb-modal-x:hover { background: rgba(109, 227, 255, .14); color: #F2F6FA; }

.mb-modal-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .18em; color: #6DE3FF; margin-bottom: 10px;
}
.mb-modal-title {
  margin: 0 0 10px; font-size: 25px; font-weight: 700;
  letter-spacing: -.015em; line-height: 1.15; padding-right: 34px;
}
.mb-modal-sub { margin: 0 0 22px; font-size: 14.5px; line-height: 1.5; color: #B6C2CF; }

.mb-modal-lists { border: 0; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; }
.mb-modal-lists legend {
  padding: 0; margin-bottom: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .16em; color: #95a3b3;
}
.mb-modal-list {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; border-radius: 11px; cursor: pointer;
  border: 1px solid rgba(109, 227, 255, .14);
  background: rgba(9, 19, 34, .55);
  transition: border-color .18s ease, background .18s ease;
}
.mb-modal-list:hover { border-color: rgba(109, 227, 255, .34); background: rgba(12, 25, 44, .8); }
.mb-modal-list input {
  flex: none; width: 18px; height: 18px; margin: 1px 0 0;
  accent-color: #2c4bc4; cursor: pointer;
}
.mb-modal-list:has(input:checked) { border-color: rgba(109, 227, 255, .45); background: rgba(20, 40, 70, .7); }
.mb-modal-list input:focus-visible { outline: 2px solid #6DE3FF; outline-offset: 2px; }
.mb-modal-list-label { display: block; font-size: 15px; font-weight: 600; color: #F2F6FA; }
.mb-modal-list-hint { display: block; margin-top: 3px; font-size: 13px; color: #A2AFBE; line-height: 1.4; }

.mb-modal-field {
  display: block; margin-bottom: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .16em; color: #95a3b3;
}
.mb-modal-input {
  width: 100%; padding: 14px 16px; margin-bottom: 16px;
  border-radius: 10px; border: 1px solid rgba(109, 227, 255, .2);
  background: rgba(6, 13, 26, .6); color: #F2F6FA;
  /* 16px: alles darunter lässt iOS beim Fokus in das Feld hineinzoomen */
  font-size: 16px; font-family: inherit;
}
.mb-modal-input:focus { outline: none; border-color: rgba(109, 227, 255, .5); }

.mb-modal-submit {
  width: 100%; padding: 15px 26px; border: none; cursor: pointer;
  border-radius: 10px; color: #fff; font-weight: 600; font-size: 15.5px;
  font-family: inherit;
  background: linear-gradient(180deg, #2c4bc4, #1d379e);
  box-shadow: 0 4px 16px rgba(29, 55, 158, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .2s ease, filter .2s ease;
}
.mb-modal-submit:hover { filter: brightness(1.08); }
.mb-modal-submit:active { transform: translateY(1px); }
.mb-modal-submit[disabled] { opacity: .6; cursor: progress; }

.mb-modal-legal { margin: 14px 0 0; font-size: 12.5px; color: #A2AFBE; text-align: center; }

.mb-modal-done { text-align: center; padding: 12px 0 4px; }
.mb-modal-done .mb-modal-title { padding: 0; }
.mb-modal-done .mb-modal-sub { margin-bottom: 24px; }
.mb-modal-check {
  width: 54px; height: 54px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #6DE3FF;
  background: rgba(109, 227, 255, .1);
  border: 1px solid rgba(109, 227, 255, .32);
}

@keyframes mb-modal-fade { from { opacity: 0; } }
@keyframes mb-modal-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

@media (max-width: 640px) {
  /* Sheet statt Dialog: unten angedockt, volle Breite, und der Panel-Boden
     respektiert die Home-Indicator-Leiste. */
  .mb-modal { padding: 0; align-items: flex-end; }
  .mb-modal-panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    animation: mb-modal-sheet .24s cubic-bezier(.2, .7, .3, 1);
  }
  .mb-modal-title { font-size: 22px; }
  .mb-modal-sub { font-size: 14px; margin-bottom: 18px; }
  .mb-modal-list { padding: 14px; }
}

@keyframes mb-modal-sheet { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ------------------------------------------------ Seitenfuß
   Ein Makro für alle Seiten (templates/public/_footer.html). Die obere Reihe
   ist genau der Fuß, der vorher in jeder Datei stand; darunter sitzt neu die
   Zeile mit Impressum und Datenschutz. Die Hover-Zustände hängen hier statt an
   den seitenweisen -h1/-h7-Klassen, weil der Fuß keiner Seite gehört. */
.mb-footer-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.mb-footer-intro {
  font-size: 13.5px; line-height: 1.6; color: #A2AFBE; max-width: 640px;
}
.mb-footer-intro a { color: #A2AFBE; }
.mb-footer-meta {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  font-size: 14px; color: #A2AFBE;
}
.mb-footer-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: #A2AFBE; transition: color .2s ease;
}
.mb-footer-link:hover { color: #6DE3FF; }
.mb-footer-next {
  font-size: 14px; font-weight: 500; color: #6DE3FF; transition: color .2s ease;
}
.mb-footer-next:hover { color: #a6efff; }

.mb-footer-legal {
  /* Abstand trennt die Links, kein Mittelpunkt dazwischen. */
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(109, 227, 255, .08);
  font-size: 13.5px; color: #7C8A9A;
}
.mb-footer-legal a { color: #A2AFBE; transition: color .2s ease; }
.mb-footer-legal a:hover { color: #6DE3FF; }
