/* ============================================================
   MB CAPITAL STRATEGIES — GLASS DESIGN SYSTEM v2 (Dezember 2026)
   Palette + Typografie der Startseite (warmes Schwarz, Elfenbein, Cormorant),
   übernommen aus der früheren Glow-Artikel-Schicht — damit Startseite, Artikel
   und alle übrigen Seiten eine Familie bilden.
   ------------------------------------------------------------
   Einheitliche Design-Schicht für ALLE Unterseiten (nicht index.html).
   Wird als LETZTES Stylesheet vor </head> geladen und vereinheitlicht:
     1. Design-Tokens (überschreibt abweichende Seiten-Tokens)
     2. Typografie (Outfit + DM Serif Display für H1)
     3. Glas-Oberflächen (Karten, Boxen, Tabellen, Formulare, Nav, Footer)
     4. Responsive Schutz (Handy / Tablet / Desktop)
     5. Barrierefreiheit (reduzierte Transparenz/Bewegung, Fokus, Fallbacks)
   Selektoren beginnen mit "html body", damit sie lokale Ein-Klassen-Regeln
   aus Inline-<style>-Blöcken schlagen, ohne überall !important zu brauchen.
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
html:root {
  --gold: #d4af37;
  --gold-strong: #e6c35c;
  --gold-light: #e6c35c;
  --gold-soft: rgba(212,175,55,0.16);
  --gold-dim: rgba(212,175,55,0.12);
  --gold-border: rgba(212,175,55,0.24);

  --bg: #0c0b09;
  --bg-soft: #151310;
  --bg-card: rgba(29,26,21,0.62);
  --dark: #0c0b09;
  --dark-2: #151310;
  --dark-3: #1d1a15;
  --dark-4: #26221b;

  --text: #f1ecdf;
  --text-2: #d9d3c5;
  --text-soft: #d9d3c5;
  --text-muted: #a39885;
  --text-dim: #8f8574;
  --muted: #a39885;
  --border: rgba(212,175,55,0.14);

  --green: #3fb87a;
  --red: #ff6b6b;

  /* Glas */
  --glass-bg: rgba(29,26,21,0.58);
  --glass-bg-strong: rgba(21,19,16,0.84);
  --glass-sheen: linear-gradient(145deg, rgba(255,240,210,0.055) 0%, rgba(255,240,210,0.012) 45%, rgba(212,175,55,0.04) 100%);
  --glass-border: rgba(212,175,55,0.16);
  --glass-border-gold: rgba(212,175,55,0.26);
  --glass-blur: 14px;
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 32px rgba(0,0,0,0.38);
  --glass-shadow-hover: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.22);

  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
  --shadow-card: var(--glass-shadow);
  --shadow-hover: var(--glass-shadow-hover);
  --shadow-gold: 0 0 30px rgba(212,175,55,0.15);

  --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  color-scheme: dark;
}

/* ---------- 2. BASIS & HINTERGRUND ---------- */
html body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(212,175,55,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 100% 35%, rgba(150,110,50,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(212,175,55,0.05) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
html body ::selection { background: rgba(212,175,55,0.35); color: #fff; }

/* ---------- 3. TYPOGRAFIE ---------- */
/* H1 + H2: Elfenbein-Serif wie auf der Startseite, Gold nur als Akzent.
   text-fill-color zurücksetzen: alte Vorlagen nutzen Gold-Verlaufstext, der Emojis unsichtbar macht. */
html body h1, html body h2 {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  -webkit-text-fill-color: currentColor !important;
  background-image: none;
  text-wrap: balance;
}
html body h1 { letter-spacing: -0.012em; line-height: 1.08; }
html body h2 { letter-spacing: -0.005em; line-height: 1.18; }
html body h3, html body h4 {
  font-family: var(--font-sans);
  text-wrap: balance;
}
html body h3 { font-weight: 600; line-height: 1.3; color: var(--gold-strong); }
html body p, html body li { text-wrap: pretty; }
html body code, html body pre, html body kbd { font-family: var(--font-mono); }
html body strong, html body b { color: var(--text); }

/* Links im Fließtext: dezent unterstrichen, gut erkennbar */
html body .article-body p a,
html body .article-body li a,
html body article p a,
html body main p a {
  text-decoration: underline;
  text-decoration-color: rgba(212,175,55,0.45);
  text-underline-offset: 3px;
}
html body .article-body p a:hover,
html body article p a:hover,
html body main p a:hover { text-decoration-color: var(--gold); opacity: 1; }

/* ---------- 4. GLAS-OBERFLÄCHEN ---------- */
html body :is(
  .card, .post, .metric-card, .faq-item, .author-box, .related-articles,
  .cta-box, .calc-card, .invest-card, .partner-card, .rechner-guide,
  .sources-box, .news-box, .aeo-block, .tool-link, .hub-link, .term,
  .avd-card, .disclaimer, .mb-newsletter-cta, .legal-callout, .result-card,
  .stat-card, .kpi-card, .feature-card, .tool-card, .glass, .panel
) {
  background-color: var(--glass-bg);
  background-image: var(--glass-sheen);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

/* Interaktive Karten: sanftes Anheben */
@media (hover: hover) {
  html body :is(.card, .post, .tool-link, .hub-link, .invest-card, .tool-card, .feature-card):hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-gold);
    box-shadow: var(--glass-shadow-hover);
  }
}

/* Gold-Akzent oben für Call-to-Action */
html body .cta-box { border-top: 2px solid var(--gold); }

/* Callouts: Glas + farbige Kante (Bedeutung bleibt erhalten) */
html body :is(.info-box, .risk-box, .success-box, .key-takeaway, .highlight-box, .warning-box, .tip-box) {
  background-color: var(--glass-bg);
  background-image: var(--glass-sheen);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow);
}
html body .risk-box, html body .warning-box { border-left-color: var(--red); }
/* Werbe-/Affiliate-Hinweise: einheitlich dunkel (überschreibt helle Inline-Farben) */
html body :is(.affiliate-disclosure, .ad-disclosure) {
  background: rgba(212,175,55,0.08) !important;
  border: 1px solid var(--glass-border-gold) !important;
  border-left: 4px solid var(--gold) !important;
  border-radius: var(--radius-sm);
  color: var(--text-soft) !important;
}
/* Ältere Artikel ohne .article-body: lesbare Zeilenlänge */
html body article.blog-post { max-width: 900px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
html body .success-box { border-left-color: var(--green); }

/* Echte Unschärfe nur ab Tablet (Handy-Performance) */
@media (min-width: 700px) {
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html body :is(.cta-box, .calc-card, .avd-card, .author-box, .rechner-guide, .info-box, .risk-box, .key-takeaway, .metric-card, .card, .post) {
      -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
      backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    }
  }
}

/* Kennzahlen */
html body .metric-value { color: var(--gold-strong); font-variant-numeric: tabular-nums; }
html body .metric-label { color: var(--text-muted); }

/* ---------- 5. TABELLEN ---------- */
html body .table-wrapper, html body .table-wrap, html body .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  max-width: 100%;
}
html body table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
html body :is(.article-body, article, main, .container, .page-wrapper) table th {
  background: rgba(212,175,55,0.10);
  color: var(--gold);
  font-weight: 700;
}
html body :is(.article-body, article, main, .container, .page-wrapper) table td,
html body :is(.article-body, article, main, .container, .page-wrapper) table th {
  border-color: rgba(255,255,255,0.07);
}
html body :is(.article-body, article, main, .container, .page-wrapper) table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.018);
}

/* ---------- 6. BUTTONS ---------- */
html body :is(.btn, .button, .cta-btn, a.cta, .btn-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6c35c 0%, #d4af37 55%, #b8932a 100%);
  color: #0b0b0d !important;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 20px rgba(212,175,55,0.22), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
html body :is(.btn, .button, .cta-btn, a.cta, .btn-primary):hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(212,175,55,0.32), inset 0 1px 0 rgba(255,255,255,0.4);
  opacity: 1;
}
html body :is(.btn-secondary, .btn-outline) {
  background: rgba(255,255,255,0.03);
  color: var(--gold) !important;
  border: 1px solid var(--glass-border-gold);
  box-shadow: none;
}

/* ---------- 7. FORMULARE ---------- */
html body :is(input[type=text], input[type=number], input[type=email], input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea) {
  background-color: rgba(12,11,9,0.72);
  color: var(--text);
  border: 1px solid var(--glass-border-gold);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: max(16px, 1em); /* verhindert iOS-Zoom beim Fokus */
  min-height: 44px;
}
html body :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
html body input[type=range] { accent-color: var(--gold); }
html body input[type=checkbox], html body input[type=radio] { accent-color: var(--gold); }

/* ---------- 8. NAVIGATION & FOOTER ---------- */
html body .nav, html body header.nav, html body header.header {
  background: rgba(12,11,9,0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(212,175,55,0.14);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(0,0,0,0.25);
}
/* Desktop-Nav darf nicht umbrechen */
@media (min-width: 1200px) {
  html body .nav .nav-inner { flex-wrap: nowrap; }
  html body .nav .nav-links { flex-wrap: nowrap; min-width: 0; }
}
/* Die volle Link-Leiste braucht ~1200 px. Darunter (Tablet, kleine Laptops)
   übernimmt das Hamburger-Menü, statt Links abzuschneiden. */
@media (max-width: 1199px) {
  html body .nav .nav-links { display: none; }
  html body .nav .nav-hamburger { display: flex; }
}
@media (min-width: 1200px) {
  html body .nav .nav-mobile, html body .nav .nav-mobile.open { display: none; }
}
@media (min-width: 700px) and (max-width: 1199px) {
  /* Tablet-Menü zweispaltig, damit es nicht endlos lang wird */
  html body .nav-mobile.open { columns: 2; column-gap: 32px; }
  html body .nav-mobile .mob-label { break-after: avoid; }
  html body .nav-mobile a { break-inside: avoid; }
}
html body .nav-hamburger { min-width: 44px; min-height: 44px; }
html body .nav-mobile { background: rgba(16,14,11,0.97); }
html body .nav-mobile a { min-height: 44px; display: flex; align-items: center; }

html body .site-footer, html body footer.footer {
  background: linear-gradient(180deg, rgba(21,19,16,0.55) 0%, rgba(12,11,9,0.92) 100%);
  border-top: 1px solid rgba(212,175,55,0.14);
}
html body .site-footer a { color: var(--text-muted); }
html body .site-footer a:hover { color: var(--gold); }

/* Breadcrumbs */
html body .breadcrumbs, html body .breadcrumb { color: var(--text-muted); font-size: 0.86rem; }
html body .breadcrumbs a, html body .breadcrumb a { color: var(--gold); }
/* Brotkrumen als <ol>: horizontal mit "›" statt nummerierter Liste (Fix 02.12.2026) */
html body .breadcrumbs ol, html body .breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
html body .breadcrumbs ol li, html body .breadcrumb ol li { margin: 0; padding: 0; }
html body .breadcrumbs ol li:not(:last-child)::after, html body .breadcrumb ol li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--text-muted); }
html body .breadcrumbs ol li:last-child::after, html body .breadcrumb ol li:last-child::after { content: none; }
html body .breadcrumbs:has(> ol) { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }

/* Section-Label (Pill) */
html body .section-label {
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--glass-border-gold);
  color: var(--gold);
  border-radius: 999px;
}

/* ---------- 9. RESPONSIVE SCHUTZ ---------- */
html body :is(img, video, iframe, canvas, svg, embed, object) { max-width: 100%; }
html body img, html body video { height: auto; }
html body pre { overflow-x: auto; max-width: 100%; }

/* Handy */
@media (max-width: 699px) {
  html body { background-attachment: scroll; }
  /* Breite Tabellen werden horizontal scrollbar statt die Seite zu sprengen */
  html body :is(.article-body, article, main, .container, .page-wrapper, section) table:not(.no-scroll) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  html body :is(.card, .post, .cta-box, .calc-card, .avd-card, .author-box, .rechner-guide, .faq-item, .related-articles, .disclaimer) {
    border-radius: 14px;
  }
  html body h1 { font-size: clamp(1.75rem, 7.6vw, 2.3rem); }
  html body h2 { font-size: clamp(1.4rem, 6vw, 1.75rem); }
  html body .btn { width: auto; max-width: 100%; white-space: normal; text-align: center; }
  /* Lange URLs/Zahlenketten brechen um */
  html body :is(p, li, td, th, dd, figcaption, .disclaimer) { overflow-wrap: anywhere; }
}

/* Tablet: Inhalte nicht zu breit, angenehme Ränder */
@media (min-width: 700px) and (max-width: 1024px) {
  html body :is(.container, .page-wrapper, .article-body, main) { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

/* ---------- 10. BARRIEREFREIHEIT & FALLBACKS ---------- */
html body :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Ohne backdrop-filter: deckendere Flächen für Lesbarkeit */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body .nav, html body header.nav { background: rgba(12,11,9,0.97); }
  html:root { --glass-bg: rgba(18,21,31,0.92); }
}
/* Nutzer, die weniger Transparenz wünschen: feste Flächen */
@media (prefers-reduced-transparency: reduce) {
  html:root { --glass-bg: #1d1a15; --glass-sheen: none; }
  html body * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html body .nav, html body header.nav { background: #0c0b09; }
}
/* Weniger Bewegung */
@media (prefers-reduced-motion: reduce) {
  html body .bg-lines span, html body .bg-wave svg { animation: none !important; }
  html body * { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html body :is(.card, .post, .btn):hover { transform: none !important; }
}
/* Hoher Kontrast */
@media (prefers-contrast: more) {
  html:root { --glass-bg: #151310; --glass-border: rgba(255,255,255,0.3); --text-muted: #c3c9db; }
}

/* Druck: hell und lesbar */
@media print {
  html body { background: #fff !important; color: #000 !important; }
  html body :is(.nav, .site-footer, .bg-lines, .bg-wave, .adsbygoogle) { display: none !important; }
  html body * { box-shadow: none !important; backdrop-filter: none !important; }
}

/* ---------- 11. KONTRAST-KORREKTUREN (aus seitenweitem Kontrast-Audit) ---------- */
/* Zu dunkle Inline-Grautöne für Kleingedrucktes auf dunklem Grund → lesbares Grau (≥ 4.5:1) */
html body [style*="color:#555" i], html body [style*="color:#666" i], html body [style*="color:#444" i],
html body [style*="color:#333"], html body [style*="color: #555"], html body [style*="color: #666"] {
  color: var(--text-dim) !important;
}
/* Ältere CTA-Boxen färben alle Links gelb hinterlegt; Textlinks mit Gold-Inline-Farbe bleiben Textlinks */
html body .cta-box a[style*="color:#d4af37" i], html body .cta-box a[style*="color: #d4af37" i], html body .cta-box a[style*="color:var(--gold" i] {
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
/* Automatisch verlinkte Glossar-Begriffe sind Textlinks, keine Buttons */
html body .cta-box a.glossar-link {
  background: transparent !important;
  color: var(--gold) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
  box-shadow: none !important;
}

/* ---------- 12. LAYOUT-SICHERUNG (aus Geräte-Audit) ---------- */
/* Ältere Seiten geben der Nav eigenes Padding → einheitliche Höhe */
html body nav.nav, html body header.nav { padding-top: 0; padding-bottom: 0; min-height: 0; }
/* Dekorative Elemente (Kompass, Glows) dürfen die Seite nie seitlich scrollbar machen.
   clip statt hidden: position:sticky der Navigation funktioniert weiter. */
html { overflow-x: clip; }
html body { overflow-x: clip; }
@media (max-width: 699px) {
  /* Alle Tabellen auf dem Handy horizontal scrollbar statt seitensprengend */
  html body table:not(.no-scroll) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* Geöffnetes Menü ist höher als der Bildschirm und hängt an der Sticky-Nav:
   eigener Scrollbereich, damit auch die unteren Links erreichbar sind */
html body .nav-mobile.open {
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- QUELLEN-BOX (.mb-sources, erzeugt von .claude/scripts/add-sources.py) ----------
   Übernommen aus der stillgelegten glow.css, auf die Tokens dieses Designsystems umgestellt. */
html body .mb-sources {
  margin: 40px 0 24px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  background-color: var(--glass-bg);
  background-image: var(--glass-sheen);
}
html body .mb-sources h2 {
  font-family: var(--font-mono) !important;
  font-size: .74rem !important;
  font-weight: 500 !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin: 0 0 8px !important;
}
html body .mb-sources h2::before { display: none !important; }
html body .mb-sources p { margin: 0 0 12px; font-size: .92rem !important; color: var(--text-muted) !important; }
html body .mb-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
html body .mb-sources li { font-size: .95rem !important; line-height: 1.5 !important; }
html body .mb-sources li::before { content: "↗"; color: var(--gold); margin-right: 8px; font-size: .85em; }
html body .mb-sources a { color: var(--text-soft) !important; text-decoration: underline; text-decoration-color: var(--glass-border-gold); text-underline-offset: 3px; }
html body .mb-sources a:hover { color: var(--gold-strong) !important; }
