/* ===================================================
   BLUTGRUPPENVERTEILUNG.DE - SHARED STYLES
   Alle Farben WCAG AA geprueft (>= 4.5:1 auf Weiss)
   =================================================== */

/* -- LOKALE FONTS -- */
/* 
   Schriften muessen lokal unter /fonts/ liegen.
   Download-Anleitung: siehe README-fonts.txt
*/
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -- VARIABLEN -- */
:root {
  --rot:       #B71C1C;   /* auf Weiss: 7.1:1 OK */
  --rot-mid:   #C62828;   /* auf Weiss: 5.9:1 OK */
  --rot-bg:    #FFEBEE;
  --blau:      #1A237E;   /* auf Weiss: 11:1  OK */
  --blau-bg:   #E8EAF6;
  --creme:     #FAF8F5;
  --creme-d:   #EDE9E3;
  --ink:       #1C1C2E;   /* auf Weiss: 17:1  OK */
  --muted:     #4A4A5A;   /* auf Weiss: 7.5:1 OK */
  --border:    #DDD8D0;
  --white:     #FFFFFF;
  --gold:      #92400E;   /* auf Weiss: 5.1:1 OK */
  --gold-bg:   #FEF3C7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--creme);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
}

/* -- SKIP LINK -- */
.skip-link {
  position: fixed; top: -200px; left: 16px;
  background: #B71C1C; color: #FFFFFF;
  padding: 8px 16px; border-radius: 0 0 6px 6px;
  font-weight: 700; font-size: 14px;
  text-decoration: none; z-index: 999;
}
.skip-link:focus { top: 0; }

/* -- HEADER -- */
header {
  background: var(--white);
  border-bottom: 2px solid var(--rot-bg);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1160px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 68px; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon img { width: 34px; height: 34px; }
.logo-text {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 16px; color: var(--ink);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
}
.logo-text small {
  display: block; font-size: 11px; font-weight: 400;
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  letter-spacing: 0;
}

nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav a {
  text-decoration: none; font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 5px 9px; border-radius: 6px;
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
nav a:hover, nav a[aria-current="page"] {
  color: var(--rot); background: var(--rot-bg);
}
nav a.nav-neg:hover, nav a.nav-neg[aria-current="page"] {
  color: var(--blau); background: var(--blau-bg);
}
nav a.nav-cta {
  background: var(--rot); color: var(--white) !important;
  padding: 5px 14px; margin-left: 4px;
}
nav a.nav-cta:hover { background: var(--rot-mid); }

.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--border);
  border-radius: 6px; padding: 6px 10px;
  cursor: pointer; font-size: 20px;
  color: var(--ink); line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  nav {
    display: none; position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 16px 24px;
    flex-direction: column; gap: 4px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  }
  nav.open { display: flex; }
  nav a { padding: 10px 12px; font-size: 15px; }
}

/* -- HERO -- */
.hero {
  background-color: #1C1C2E;
  padding: 64px 24px 52px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 90% at 50% 10%, rgba(183,28,28,0.22) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #FF8A80;
  border: 1px solid rgba(255,138,128,0.35);
  background: rgba(255,138,128,0.08);
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 20px; position: relative; z-index: 1;
}
.hero h1 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(26px, 4.5vw, 50px);
  font-weight: 700; color: #FFFFFF;
  line-height: 1.15; letter-spacing: -0.025em;
  max-width: 740px; margin: 0 auto 18px;
  position: relative; z-index: 1;
}
.hero h1 em { font-style: italic; color: #EF9A9A; }
.hero-lead {
  font-size: 17px; color: rgba(255,255,255,0.75);
  max-width: 580px; margin: 0 auto 40px; position: relative; z-index: 1;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; overflow: hidden;
}
.stat { padding: 20px 16px; border-right: 1px solid rgba(255,255,255,0.08); }
.stat:last-child { border-right: none; }
.stat-val {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 32px; font-weight: 700; color: var(--white); line-height: 1;
}
.stat-label { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }

/* -- LAYOUT -- */
.page-wrap { max-width: 1160px; margin: 0 auto; padding: 64px 24px; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
@media (max-width: 960px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static !important; }
}

/* -- TYPOGRAPHY -- */
.eyebrow {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rot); margin-bottom: 8px;
}
.eyebrow.blau { color: var(--blau); }
h2.title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700; color: var(--ink);
  line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px;
}
.lead { font-size: 16px; color: var(--muted); max-width: 640px; margin-bottom: 32px; }
.prose p {
  font-size: 16px; color: #2A2A3A;
  line-height: 1.8; margin-bottom: 16px; max-width: 700px;
}
.prose h3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 19px; font-weight: 700; color: var(--ink);
  margin: 32px 0 12px; letter-spacing: -0.01em;
}
.prose a { color: var(--rot); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--rot-mid); }

/* -- SUMMARY BOX -- */
.summary {
  background: var(--rot-bg); border-left: 4px solid var(--rot);
  border-radius: 0 8px 8px 0; padding: 14px 18px;
  margin: 24px 0; font-size: 15px; color: var(--ink); line-height: 1.65;
}
.summary.blau { background: var(--blau-bg); border-left-color: var(--blau); }

/* -- TABELLE -- */
.tbl { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.tbl th {
  background: var(--rot); color: var(--white);
  padding: 10px 14px; text-align: left;
  font-weight: 600; font-size: 13px; letter-spacing: 0.03em;
}
.tbl th.b { background: var(--blau); }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:nth-child(even) td { background: var(--creme); }
.tbl caption { font-size: 12px; color: var(--muted); text-align: left; padding: 6px 0; caption-side: bottom; }

/* -- BAR CHART -- */
.bar-chart { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.bar-row { display: grid; grid-template-columns: 60px 1fr 48px; align-items: center; gap: 12px; }
.bar-lbl { font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; }
.bar-track { background: var(--creme-d); border-radius: 4px; height: 38px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 4px;
  display: flex; align-items: center; padding-left: 10px;
}
.bar-fill.pos { background: var(--rot); }
.bar-fill.neg { background: var(--blau); }
.bar-fill span { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.95); }
.bar-pct { font-size: 14px; font-weight: 700; }
.bar-pct.pos { color: var(--rot); }
.bar-pct.neg { color: var(--blau); }
.chart-note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* -- CARDS -- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 32px; }
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 18px;
  text-decoration: none; color: inherit; display: block;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--rot); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.card.neg::after { background: var(--blau); }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 28px rgba(0,0,0,0.09); }
.card:hover::after { transform: scaleX(1); }
.card:focus { outline: 3px solid var(--rot); outline-offset: 2px; }
.card-lbl { font-family: 'Libre Baskerville', Georgia, serif; font-size: 30px; font-weight: 700; color: var(--rot); line-height: 1; margin-bottom: 6px; }
.card.neg .card-lbl { color: var(--blau); }
.card-pct { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.card-pct strong { color: var(--ink); font-size: 16px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.card-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--rot); }
.card.neg .card-more { color: var(--blau); }

/* -- HOWTO CARDS -- */
.howto { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 28px; }
.howto-item { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 22px 18px; }
.howto-icon { font-size: 28px; margin-bottom: 10px; }
.howto-title { font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.howto-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* -- SIDEBAR -- */
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
.aff-box { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 24px 20px; }
.aff-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--gold-bg); color: var(--gold); border: 1px solid #FCD34D; padding: 3px 10px; border-radius: 20px; margin-bottom: 12px; }
.aff-title { font-family: 'Libre Baskerville', Georgia, serif; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.aff-list { display: flex; flex-direction: column; gap: 10px; }
.aff-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s; }
.aff-item:hover { border-color: #FCD34D; background: #FFFDF5; }
.aff-item:focus { outline: 3px solid var(--rot); outline-offset: 2px; }
.aff-thumb { width: 40px; height: 40px; background: var(--rot-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.aff-name { font-size: 13px; font-weight: 500; line-height: 1.35; flex: 1; color: var(--ink); }
.aff-arrow { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.aff-note { font-size: 11px; color: var(--muted); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); line-height: 1.5; }

.info-box { background: var(--rot-bg); border: 1px solid rgba(183,28,28,0.2); border-radius: 12px; padding: 20px; }
.info-box-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rot); margin-bottom: 10px; }
.info-box p { font-size: 14px; color: #3A1515; line-height: 1.65; }
.info-box a { color: var(--rot); font-weight: 700; font-size: 13px; display: inline-block; margin-top: 12px; text-decoration: none; }

/* -- FAQ -- */
.faq { margin: 40px 0; }
.faq > h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 20px; }
details.faq-item { border-bottom: 1px solid var(--border); }
summary.faq-q {
  padding: 16px 0; font-weight: 700; font-size: 15px; color: var(--ink);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; list-style: none;
  user-select: none;
}
summary.faq-q::-webkit-details-marker { display: none; }
.faq-icon { color: var(--rot); font-size: 20px; flex-shrink: 0; transition: transform 0.2s; font-style: normal; }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 0 16px; font-size: 15px; color: var(--muted); line-height: 1.75; max-width: 680px; }

/* -- BREADCRUMB -- */
.breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 24px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--rot); }

/* -- BUTTONS -- */
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px; padding: 12px 24px; border-radius: 8px; transition: background 0.15s; }
.btn-primary { background: var(--rot); color: var(--white); }
.btn-primary:hover { background: var(--rot-mid); }
.btn-ghost { background: var(--creme-d); color: var(--ink); }
.btn-ghost:hover { background: var(--border); }

/* -- SOURCES -- */
.sources { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.sources h4 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.sources ol { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.sources a { color: var(--rot); word-break: break-all; }

/* -- PAGE NAV -- */
.page-nav { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; flex-wrap: wrap; }

/* -- FOOTER -- */
footer { background: var(--ink); padding: 56px 24px 32px; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.footer-brand { font-family: 'Libre Baskerville', Georgia, serif; color: var(--white); font-size: 16px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.7; max-width: 240px; }
.footer-col-title { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.6); margin-bottom: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { max-width: 1160px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}

/* -- SPACING UTILS -- */
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }

/* -- HERO MOBILE -- */
@media (max-width: 600px) {
  .hero {
    padding: 36px 16px 32px;
  }
  .hero h1 {
    font-size: clamp(22px, 7vw, 30px);
    margin-bottom: 12px;
  }
  .hero-lead {
    font-size: 15px;
    margin-bottom: 24px;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
  .stat {
    padding: 14px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .stat:nth-child(odd)  { border-right: 1px solid rgba(255,255,255,0.08); }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .stat-val   { font-size: 24px; }
  .stat-label { font-size: 10px; }
}
