:root{
  --maxw: 1100px;
  --gap: 24px;
  --brand: #4054b2;
  --brand-2: #45bf55;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --border: #e5e7eb;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
}

*,*::before,*::after{box-sizing:border-box}
html {scrollbar-gutter: stable;}
@supports not (scrollbar-gutter: stable) {  html { overflow-y: scroll; }}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  color:var(--text);
  background:var(--bg);
  line-height:1.6
}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
ul{padding-left:1.2rem;margin:0 0 1em}
h1,h2,h3{line-height:1.2;margin:0 0 .5em}
h2{margin-top:1.5em}
p{margin:0 0 1em}

.container{max-width:var(--maxw);margin:0 auto;padding:0 var(--gap)}

/* Header + Nav */
header.site-header{border-bottom:none;background:#fff;position:sticky;top:0;z-index:40}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:48px;width:auto}
.brand-title{font-weight:700;font-size:1.1rem;white-space:nowrap}

.menu-toggle{display:none;border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px 10px;cursor:pointer}
.menu-toggle:focus{outline:2px solid var(--brand);outline-offset:2px}

nav.primary{display:flex;gap:18px;align-items:center;position:relative}

/* UL-Layout Desktop */
.nav-root{
  display:flex;
  gap:18px;
  align-items:center;
  margin:0;
  padding:0;
  list-style:none;
}

/* Einheitliche Basis für Links und Buttons im Hauptmenü */
.nav-link,
button.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;     /* gleiche Klick-/Hover-Fläche */
  border-radius: 6px;
  color: var(--text);
  font: inherit;          /* gleiche Schrift */
  line-height: 1.2;
  background: transparent;
  border: none;           /* Buttons ohne Rahmen */
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover,
button.nav-link:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

/* Dropdown – robust und nahtlos */
.nav-item{position:relative}
.dropdown { position: relative; }

/* Toggle-Pfeil (optional) */
.dropdown-toggle::after{
  content:"▾"; font-size:.8em; line-height:1; transform:translateY(1px);
}

/* Minimierter Abstand, keine Umrahmung */
.dropdown-menu{
  position:absolute;
  left:0;
  top:100%;
  margin-top:-1px;        /* 1px Überlappung → keine Hover-Lücke */
  background:#fff;
  border:0;
  box-shadow:none;
  min-width:220px;
  padding:6px 8px;
  display:none;
  z-index:60;
}

.dropdown.open > .dropdown-menu { display:block; }

/* Optional: Hover-Öffnung nur auf präzisen Desktop-Pointern */
@media (hover:hover) and (pointer:fine) {
  .dropdown:hover > .dropdown-menu { display:block; }
}

/* Nahtloser Übergang Toggle ↔ Menü */
.dropdown.open > .nav-link{
  background: var(--bg-alt);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.dropdown.open > .dropdown-menu{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Menüeinträge: konsistent und gut klickbar */
.dropdown-menu a{
  display:block;
  padding:10px 10px;
  border-radius:6px;
  color:var(--text);
}
.dropdown-menu a:hover{
  background:var(--bg-alt);
  text-decoration:none;
}

/* Fokusstil für Tastaturbedienung (empfohlen) */
.nav-link:focus,
button.nav-link:focus,
.dropdown-menu a:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Mobile Navigation */
@media (max-width: 900px){
  .menu-toggle{display:inline-flex;align-items:center;gap:8px}
  .brand-title{display:none}

  nav.primary{
    display:none;
    flex-direction:column;
    align-items:stretch;
    padding:12px 0;
    width:100%;
    background:#fff;
    border-top:1px solid var(--border);
    overflow-x:hidden; /* Sicherheit gegen horizontales Scrollen */
  }
  nav.primary.open{display:flex}

  .nav-root{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    width:100%;
    overflow-x:hidden;
  }

  .nav-link,
  button.nav-link{
    width:100%;
    padding:12px 12px;
  }

  .dropdown-menu{
    position:static;
    margin-top:0;
    padding:4px 0 0 12px; /* leichte Einrückung; bei Bedarf 0 */
    border:0;
    box-shadow:none;
    display:none;
  }
  .dropdown.open > .dropdown-menu{display:block}
}

/* Hero / Feature / Content / Footer */
.hero{background:var(--bg);padding:28px 0 8px}
.hero h1{font-size:clamp(1.6rem, 2.4vw, 2.2rem);margin-bottom:.25em}
.hero p.lead{color:var(--muted);margin:0}
.feature{margin:18px 0 32px}
.figure{margin:0;border-radius:12px;overflow:hidden;border:1px solid var(--border)}
.figure img{width:100%;height:auto}
.content{padding:10px 0 44px}
.card{background:#fff;border:none solid var(--border);border-radius:12px;padding:clamp(16px, 2vw, 28px)}
.sep{height:1px;background:transpartent(--border);margin:0;}
blockquote{margin:1rem 0;padding:12px 16px;border-left:4px solid var(--brand);background:var(--bg-alt);border-radius:8px}
blockquote p{margin:.25em 0}
footer.site-footer{border-top:1px solid var(--border);background:#fff;padding:16px 0;margin-top:24px}
.footer-grid{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.footer-nav{display:flex;flex-wrap:wrap;gap:16px}
.muted{color:var(--muted)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Optional: A11y-Button (falls nicht in separater a11y.css) */
.a11y-toggle{
  position: fixed;
  left: 14px;
  bottom: 120px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: #4054b2;
  color:#fff; border:none; cursor:pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.16);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.a11y-toggle .icon{ font-size:22px; line-height:1 }
.a11y-toggle:hover{ transform: translateY(-1px); box-shadow:0 10px 22px rgba(0,0,0,.2); background:#334397 }
.a11y-toggle:focus{ outline:3px solid #8aa0ff; outline-offset:2px }
.a11y-toggle .label{
  position:absolute; left:56px; white-space:nowrap; background:#111827; color:#fff;
  padding:6px 8px; border-radius:6px; font-size:.85rem; box-shadow:0 6px 16px rgba(0,0,0,.16);
  opacity:0; transform:translateY(2px); pointer-events:none; transition:opacity .12s ease, transform .12s ease;
}
.a11y-toggle:hover .label, .a11y-toggle:focus .label{ opacity:1; transform:translateY(0) }

.a11y-panel{
  position: fixed; left:14px; bottom:172px; z-index:60; background:#fff;
  border:1px solid var(--border); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.12);
  width:300px; max-width:92vw; padding:10px 12px; display:none;
}
.a11y-panel.open{ display:block }
.a11y-panel h3{ margin:4px 0 8px; font-size:1rem }
.a11y-actions{ display:grid; gap:8px }
.a11y-actions button{
  width:100%; text-align:left; border:1px solid var(--border); background:#f7f7fb;
  padding:8px; border-radius:8px; cursor:pointer;
}
.a11y-actions button:hover{ background:#eef2ff }

/* Effekte */
html.a11y-contrast, html.a11y-contrast *{ background:#000 !important; color:#fff !important; box-shadow:none !important }
html.a11y-underline a{ text-decoration:underline !important }
html.a11y-lg a, html.a11y-lg p, html.a11y-lg li, html.a11y-lg h1, html.a11y-lg h2, html.a11y-lg h3{ letter-spacing:.02em }
html.a11y-lspace a, html.a11y-lspace p, html.a11y-lspace li{ letter-spacing:.06em }
html.a11y-lheight a, html.a11y-lheight p, html.a11y-lheight li{ line-height:1.9 }
.reading-guide{
  position:fixed; left:0; right:0; top:80px; height:14px;
  border:3px solid #20ff69; border-radius:6px; background:#000;
  opacity:.9; pointer-events:none; z-index:59; display:none;
}
.reading-guide.show{ display:block }

@media (max-width: 420px){
  .a11y-toggle{ width:44px; height:44px; bottom:110px; }
  .a11y-toggle .icon{ font-size:20px }
  .a11y-panel{ bottom:160px; width:280px; }
}
