:root {
  --bg: #0e1020;
  --ink: #e9ecff;
  --muted: #aab0e0;
  --brand: #8ab4ff;
  --brand-dark: #9bbdff;
  --accent: #67e8f9;
  --card: #171b3a;
  --soft: #101532;
  --radius: 20px;
  --shadow: 0 12px 36px rgba(0, 0, 0, .35);
  /* Tabellen */
  --border: rgba(255, 255, 255, .15);
  --table-header-bg: rgba(255, 255, 255, .06);

  /* Modul-Farben */
  --xqm1: #8ab4ff;
  --xqm2: #3b82f6;
  /* blau */
  --vqm1: #34d399;
  --vqm2: #10b981;
  /* grün */
  --ieq1: #fbbf24;
  --ieq2: #f59e0b;
  /* orange */
  --xdm1: #8B1C34;
  --xdm2: #70152A;
  /* bordeaux */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, #1b214b 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, #122241 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

header[role="banner"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

nav[aria-label] {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

nav a {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(138, 180, 255, .10);
}

nav a:hover {
  background: rgba(138, 180, 255, .18);
}

/* Fokus & aktiv */
nav[aria-label] a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
  text-decoration: none;
}

nav[aria-label] a[aria-current="page"] {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .06) inset;
  background: rgba(138, 180, 255, .16);
}

.card {
  background: linear-gradient(180deg, rgba(23, 27, 58, .78), rgba(23, 27, 58, .36));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.6vw, 44px);
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(138, 180, 255, .12);
  color: var(--ink);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #0b1020;
  border: 0;
}

/* Generische Preview */
.preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  background: linear-gradient(180deg, rgba(23, 27, 58, .55), rgba(23, 27, 58, .25));
  border: 1px solid rgba(255, 255, 255, .08);
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(1.05);
}

.tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: .8rem;
  color: #0b1020;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Pill-Grid (allgemein) */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 8px 0 0;
}

.pill {
  font-size: .78rem;
  color: #0b1020;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-block;
}

/* Brentano-Pill-Varianten */
.pill-substanz {
  background: linear-gradient(135deg, var(--xqm1), var(--xqm2));
  color: #0b1020;
}

.pill-relation {
  background: linear-gradient(135deg, var(--vqm1), var(--vqm2));
  color: #0b1020;
}

.pill-akzidenz {
  background: linear-gradient(135deg, var(--ieq1), var(--ieq2));
  color: #0b1020;
}

.pill-modus {
  background: linear-gradient(135deg, var(--xdm1), var(--xdm2));
  color: #0b1020;
}

.section {
  margin: 28px 0;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 3vw, 28px);
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.note {
  font-size: .95rem;
  color: var(--muted);
  margin: 1rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid var(--brand);
  background: rgba(255, 255, 255, .04);
  border-radius: .5rem;
  line-height: 1.55;
}

.note strong {
  color: var(--ink);
}

.note em {
  font-style: italic;
  color: var(--brand-dark);
}

.note ul {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.45;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cards-1x4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width:1200px) {
  .cards-1x4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:980px) {
  .cards-1x4 {
    grid-template-columns: 1fr;
  }
}

footer {
  margin: 36px 0 12px;
  color: var(--muted);
}

footer .links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width:980px) {
  .columns {
    grid-template-columns: 1fr;
  }

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

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

/* Accessibility Hilfsklasse */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Thesis */
.thesis {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, .04);
  font-size: 1.15rem;
  line-height: 1.6;
  font-style: italic;
}

.thesis p {
  margin: 0;
}

/* Einzigartigkeit */
.uniqueness {
  margin: 40px 0;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 27, 58, .85), rgba(23, 27, 58, .45));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .1);
}

.uniqueness h2 {
  margin-top: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  color: var(--brand);
}

.uniqueness p {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1em;
}

.uniqueness .note {
  font-size: .95rem;
  color: var(--muted);
  margin-top: 1em;
  font-style: italic;
}

/* Tabellen */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: calc(var(--radius) - 6px);
  background: linear-gradient(180deg, rgba(23, 27, 58, .55), rgba(23, 27, 58, .25));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  line-height: 1.5;
}

.table-wrap th,
.table-wrap td {
  padding: .65rem .85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.table-wrap th {
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--table-header-bg);
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

@media (hover:hover) and (pointer:fine) {
  .table-wrap tbody tr:hover td {
    background: rgba(255, 255, 255, .035);
  }

  .table-wrap {
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .02);
  }
}

/* Mobile/Hamburger-Navigation */
.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #0b1020;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.nav-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-label {
  font-size: .95rem;
}

.nav-burger {
  position: relative;
  width: 22px;
  height: 14px;
}

.nav-burger::before,
.nav-burger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #0b1020;
  border-radius: 2px;
  transition: transform .18s ease, top .18s ease, bottom .18s ease;
}

@media (prefers-reduced-motion:reduce) {

  .nav-burger::before,
  .nav-burger::after {
    transition: none;
  }
}

.nav-burger::before {
  top: 0;
}

.nav-burger::after {
  bottom: 0;
}

@media (max-width:980px) {
  .nav-toggle {
    display: inline-flex;
  }

  header[role="banner"] nav[aria-label] {
    display: none;
    position: absolute;
    right: 0;
    top: 56px;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(23, 27, 58, .95), rgba(23, 27, 58, .85));
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    padding: 12px;
    width: min(92vw, 360px);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 8px;
  }

  header[role="banner"] nav[aria-label] a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(138, 180, 255, .10);
  }

  header[role="banner"] nav[aria-label] a:hover {
    background: rgba(138, 180, 255, .18);
  }

  .site-nav.open nav[aria-label] {
    display: flex;
    animation: navDrop .18s ease-out both;
  }

  @keyframes navDrop {
    from {
      transform: translateY(-6px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
}

/* Burger → X */
.site-nav.open .nav-burger::before {
  transform: rotate(45deg);
  top: 6px;
}

.site-nav.open .nav-burger::after {
  transform: rotate(-45deg);
  bottom: 6px;
}

/* Brentano-Karten */
.brentano-grid .brentano-card {
  display: flex;
  flex-direction: column;
}

.brentano-grid .brentano-card .pill {
  margin-top: auto;
  margin-bottom: 2px;
}

@media (max-width:420px) {
  .brentano-grid .brentano-card .pill {
    font-size: .72rem;
    padding: 5px 9px;
  }
}

/* Farbige Abkürzungen */
.abbr {
  font-weight: 800;
  letter-spacing: .02em;
}

.abbr-substanz {
  color: var(--xqm2);
}

.abbr-relation {
  color: var(--vqm2);
}

.abbr-akzidenz {
  color: var(--ieq2);
}

.abbr-modus {
  color: var(--xdm2);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  color: #0b1020;
  vertical-align: middle;
}

.badge-substanz {
  background: linear-gradient(135deg, var(--xqm1), var(--xqm2));
}

.badge-relation {
  background: linear-gradient(135deg, var(--vqm1), var(--vqm2));
}

.badge-akzidenz {
  background: linear-gradient(135deg, var(--ieq1), var(--ieq2));
}

.badge-modus {
  background: linear-gradient(135deg, var(--xdm1), var(--xdm2));
}

/* Link-Badges im Weiterführend-Block */
.link-row .badge {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ink);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.link-row .badge:hover {
  background: rgba(255, 255, 255, .14);
  text-decoration: none;
}

.link-row .badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none;
}

/* Utilities */
.h-center {
  text-align: center;
}

h2 .badge {
  margin-right: 6px;
}

/* kleine farbige Punkte */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: baseline;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .12) inset;
}

.dot-xqm {
  background: linear-gradient(135deg, var(--xqm1), var(--xqm2));
}

.dot-vqm {
  background: linear-gradient(135deg, var(--vqm1), var(--vqm2));
}

.dot-ieq {
  background: linear-gradient(135deg, var(--ieq1), var(--ieq2));
}

.dot-xdm {
  background: linear-gradient(135deg, var(--xdm1), var(--xdm2));
}

nav[aria-label] a[aria-current="page"] .dot {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) inset;
}

.mjx-svg-span svg {
  overflow: visible;
}

.mjx-container {
  line-height: 0;
}

/* Karten mit Fußbereich: Buttons unten */
.cards .card {
  display: flex;
  flex-direction: column;
}

.card .card-actions {
  margin-top: auto;
}

.card .btn {
  margin-top: .5rem;
  white-space: nowrap;
}

@media (max-width:480px) {
  .card .btn {
    padding: 10px 14px;
  }
}

/* Glossar: Scroll-Offset */
.letter-head {
  scroll-margin-top: 84px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--brand, #6ea8fe);
}

.brand:hover {
  opacity: .92;
}

.brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 8px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: currentColor;
  -webkit-mask: url('/img/favicon.svg') no-repeat center / contain;
  mask: url('/img/favicon.svg') no-repeat center / contain;
}

.brand-name {
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  .brand {
    color: var(--brand-dark, #9bbdff);
  }
}

@supports not ((-webkit-mask: url("")) or (mask: url(""))) {
  .brand-mark {
    background: none;
    background-image: url('/img/favicon-32x32.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
  }
}

#mainmenu a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
}

/* Breadcrumb kompakt */
.crumbs {
  margin: .25rem 0 .5rem;
  line-height: 1.2;
  display: inline-flex;
  gap: .25rem;
  opacity: .85;
  align-items: center;
}

main .crumbs+.card {
  margin-top: .5rem;
}

/* Publikationen-Teaser */
.card.pub-teaser {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  position: relative;
  background: linear-gradient(180deg, rgba(23, 27, 58, .92), rgba(23, 27, 58, .65));
  border: 1px solid rgba(138, 180, 255, .35);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
}

.card.pub-teaser::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: 1;
}

.card.pub-teaser .pub-teaser__title {
  margin: 0 0 .5rem;
  font-size: clamp(1.2rem, 1.8vw, 1.35rem);
  color: var(--brand);
  font-weight: 700;
  letter-spacing: .02em;
}

.pub-teaser__content h3 {
  margin: .25rem 0 .5rem;
  font-size: 1.05rem;
}

.pub-teaser__content p {
  margin: .35rem 0;
}

.pub-teaser__content .abstract {
  color: var(--ink);
  opacity: .92;
}

.pub-teaser__meta {
  margin: .5rem 0;
  font-size: .92rem;
  color: var(--muted);
}

.pub-teaser a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--brand) 60%, transparent);
}

.pub-teaser a:hover {
  text-decoration: none;
  border-bottom-style: solid;
}

.pub-teaser__content ul {
  margin: .25rem 0 .25rem 1.2rem;
  padding: 0;
}

.pub-teaser__content li {
  margin: .25rem 0;
}

@media (max-width:520px) {
  .pub-teaser {
    padding: .95rem 1rem;
  }

  .pub-teaser__content h3 {
    font-size: 1rem;
  }
}

@media print {
  .pub-teaser {
    background: none;
    box-shadow: none;
    border: 1px solid #999;
  }

  .pub-teaser::before {
    background: #000;
    opacity: 1;
  }
}

/* 1×2 Grid Startseite */
.cards-1x2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width:980px) {
  .cards-1x2 {
    grid-template-columns: 1fr;
  }
}

/* Theorie-Seiten Grid */
.theory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.theory-xqm {
  border-left: 6px solid var(--brand);
}

.theory-vqm {
  border-left: 6px solid #2a9d8f;
}

.theory-ieq {
  border-left: 6px solid #e9c46a;
}

.theory-xdm {
  border-left: 6px solid #f4a261;
}

.theory-grid .card {
  position: relative;
  padding: 1rem 1.2rem;
}

.theory-grid h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* Lead-Story */
.lead-story {
  margin: 2rem 0 2.5rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1rem;
  background: var(--card-bg, #10121f);
}

.lead-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.lead-figure {
  margin: 0;
}

.lead-figure img {
  width: 100%;
  height: auto;
  border-radius: .8rem;
  display: block;
}

.lead-figure figcaption {
  opacity: .8;
  font-size: .9rem;
  margin-top: .4rem;
}

.lead-text p {
  margin: .6rem 0 0;
}

@media (min-width:860px) {
  .lead-grid {
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
  }
}

/* === HERO (stabil, ohne Zwangshöhe links) === */
.hero.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  align-items: stretch;
  margin: 1.2rem 0 1.6rem;
}

/* linke Karte kompakt */
.hero .hero-left {
  padding: 1rem 1.1rem;
}

.hero-left h1 {
  margin: 0 0 .35rem;
  font-size: clamp(28px, 4.2vw, 42px);
}

.hero-left .lead {
  margin: .35rem 0 0;
}

/* mobil: stapeln, Bildhöhe behalten */
@media (max-width:960px) {
  .hero.hero-grid {
    grid-template-columns: 1fr;
  }

  .hero .hero-right {
    height: 38vh;
    min-height: 260px;
  }
}

/* Bridge-Lead (Intro über den Pills) */
.bridge-lead {
  margin: 0 0 .6rem;
  color: var(--ink);
  opacity: .95;
}

/* Pill-Cloud seitenbreit – Abstände; Farbstil bleibt GELB wie .pill */
.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  column-gap: 12px;
  /* horizontal */
  row-gap: 10px;
  /* vertikal */
  margin-top: .5rem;
}

/* === HERO-Bild wie früher, ohne Cropping === */

/* Globale Preview: Bilder nie strecken */
.preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero: rechter Bildbereich – feste 16:9-Fläche, Bild vollständig (Letterboxing ok) */
.hero .hero-right {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #0a0d1a;
  /* dunkler Rand bei Letterboxing */
  overflow: hidden;
  aspect-ratio: 16 / 9;
  /* wie dein width/height (1600x900) */
}

/* Bild komplett anzeigen, mittig – KEIN Cropping */
.hero .hero-right img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* ← alles sichtbar */
  object-position: center;
}

/* mobil: einspaltig, Bild ohne Cropping und ohne feste Höhe */
@media (max-width: 960px) {
  .hero.hero-grid {
    grid-template-columns: 1fr;
  }

  .hero .hero-right {
    aspect-ratio: auto;
    /* 16:9 aufheben */
    height: auto;
    /* keine feste Höhe */
    min-height: 0;
    overflow: visible;
    /* nichts abschneiden */
  }

  .hero .hero-right img {
    width: 100%;
    height: auto;
    /* natürliche Höhe -> ganzes Bild sichtbar */
    object-fit: contain;
    /* kein Cropping */
    object-position: center;
  }
}

/* Schnell­einstieg: eigene Markenfarben (dezent) */
:root {
  --quick1: #6d85d8;
  /* gedämpftes Blau (nahe --brand) */
  --quick2: #3e6f86;
  /* gedämpftes Teal */
}

/* Linke Hero-Spalte: Button an den Schluss drücken */
.hero .hero-left {
  display: flex;
  flex-direction: column;
}

/* CTA unten fixieren */
.hero .hero-left .hero-cta {
  margin-top: auto;
  /* schiebt die CTA ans Ende */
  padding-top: .75rem;
  /* optische Luft */
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* Buttons */
.btn-quickstart {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ink);
  font-weight: 700;
}

.btn-quickstart:hover {
  background: rgba(255, 255, 255, .10);
  text-decoration: none;
}

/* optional: kleine Variante für Sekundär-CTA */
.btn-ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .14);
}

/* Punkt vor „Intro“ in der Navi */
.dot-quick {
  background: linear-gradient(135deg, var(--quick1), var(--quick2));
}

/* --- Ergänzungen für Robustheit --- */

/* 1) Kinder im Hero-Grid dürfen schrumpfen → verhindert Überlauf rechts */
.hero.hero-grid>* {
  min-width: 0;
}

/* 2) Sicherheitsnetz: rechte Spalte darf nicht breiter werden */
.hero .hero-right {
  width: 100%;
  max-width: 100%;
  justify-self: stretch;
}

/* B: dezente Caption unter dem Bild */
.hero .hero-right .tag {
  display: none;
}

/* altes Overlay sicherheitshalber aus */
.ipns-cap {
  font-size: .85rem;
  color: var(--muted);
  padding: .4rem .6rem .6rem;
  text-align: right;
}

/* 1) Figure-Default-Rand entfernen (sonst wirkt's wie Balken oben/unten) */
.preview {
  margin: 0;
}

/* 2) Gleichmäßiger Innenrand rund ums Bild → links/rechts jetzt sichtbar */
.hero .hero-right {
  padding: 8px;
  /* gleichmäßiger Rand innen */
  box-sizing: border-box;
  /* Padding in die Gesamtbreite einkalkulieren */
  background: #0a0d1a;
  /* bleibt der Letterboxing-Hintergrund */
}

/* Mobil etwas schmaler, damit das Bild größer bleibt */
@media (max-width:960px) {
  .hero .hero-right {
    padding: 4px;
  }
}

/* Modul-Buttons in Markenfarben */
.btn-xqm {
  background: linear-gradient(135deg, var(--xqm1), var(--xqm2));
  color: #0b1020;
  border: 0;
}

.btn-vqm {
  background: linear-gradient(135deg, var(--vqm1), var(--vqm2));
  color: #0b1020;
  border: 0;
}

.btn-ieq {
  background: linear-gradient(135deg, var(--ieq1), var(--ieq2));
  color: #0b1020;
  border: 0;
}

/* Bordeaux ist dunkel → weiße Schrift für Kontrast */
.btn-xdm {
  background: linear-gradient(135deg, var(--xdm1), var(--xdm2));
  color: #ffffff;
  border: 0;
}

.cat-legend {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0
}

.cat-legend li {
  margin: .28rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: baseline
}

.cat-legend .init {
  font-weight: 900;
  letter-spacing: .01em
}

.cat-legend .legend-meta {
  color: var(--muted);
  font-size: .95rem
}

/* Neutraler Stil NUR für Pills ohne Modulvariante: */
.pill-cloud .pill:not(.pill-substanz):not(.pill-relation):not(.pill-akzidenz):not(.pill-modus) {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--ink);
}

/* Modulvarianten – bleiben bunt wie definiert */
.pill-substanz {
  background: linear-gradient(135deg, var(--xqm1), var(--xqm2));
  color: #0b1020;
}

.pill-relation {
  background: linear-gradient(135deg, var(--vqm1), var(--vqm2));
  color: #0b1020;
}

.pill-akzidenz {
  background: linear-gradient(135deg, var(--ieq1), var(--ieq2));
  color: #0b1020;
}

.pill-modus {
  background: linear-gradient(135deg, var(--xdm1), var(--xdm2));
  color: #0b1020;
}

.praxis-section .card {
  background: rgba(255, 255, 255, .03);
  border-left: 4px solid var(--brand);
  padding: 1.4rem 1.6rem;
}

.praxis-list {
  margin: 1rem 0 1.2rem 0;
  line-height: 1.55;
}

/* Module: Buttons in VQM/IEQ/XDM auf eine Linie ausrichten */
#module .cards .card .btn {
  margin-top: auto;
  /* Button an den unteren Rand der Card schieben */
  align-self: flex-start;
  /* Button links bündig, wie bisher */
}
.card h3 {
  margin-bottom: .4rem;
  font-size: 1.3rem;
  line-height: 1.2;
}

/* Untertitel in Kartenüberschriften (z. B. XQM–VQM–IEQ–XDM) */
.card h3 .subtitle {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
/* Konsistente Unterüberschriften (z. B. Kontaktseite) */
h3 {
  margin: 1.2rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: .01em;
}

/* Optional für Barrierefreiheit – Abstand nach unten in langen Textblöcken */
h3 + p {
  margin-top: 0.4rem;
}
/* === MathJax (SVG) Hardening – am Dateiende einfügen === */

/* 1) Container neutralisieren */
mjx-container { line-height: 0; }                   /* hast du schon – hier zur Vollständigkeit */
mjx-container, mjx-container * { box-sizing: content-box; }

/* 2) Inline-Formeln: nicht als Block behandeln, nicht responsiv stretchen */
mjx-container[jax="SVG"] svg.mjx-svg {
  display: inline !important;
  max-width: none !important;
  width: auto;
  height: auto;
  overflow: visible;
  vertical-align: -0.2em; /* stabilisiert die Grundlinie bei inline-Math */
}

/* 3) Block-Formeln hübsch als Block zentrieren */
mjx-container[display="true"] {
  display: block;
  text-align: center;
  margin: 1em 0;
}

mjx-container[display="true"] svg.mjx-svg {
  display: block !important;
  margin: .5em auto;
}


