/* wuppertal-jetzt – Designsystem in meksoft-Farben */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
}

:root {
  --primary: #0A1B65;
  --primary-2: #142C8C;
  --primary-3: #1D3AA8;
  --tint: #5B7CFF;
  --accent: #FD7E14;
  --accent-2: #FF5A36;
  --accent-soft: #FFF1E6;
  --text: #3B4256;
  --heading: #0A1B65;
  --muted: #6B7290;
  --line: #E8EBF4;
  --soft: #F4F6FC;
  --surface: #FFFFFF;
  --ok: #1F9D6B;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(10, 27, 101, .04), 0 8px 24px rgba(10, 27, 101, .06);
  --shadow-lg: 0 18px 50px rgba(10, 27, 101, .14);
  --wrap: 1200px;
  --font: "Inter", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--surface);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "tnum";
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { color: var(--heading); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: .8em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 2000; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); font-weight: 500; }

/* ---------- Topbar ---------- */
.topbar {
  --topbar-h: 72px;
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10, 27, 101, .96);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: box-shadow .25s, background .25s;
}
.topbar.is-scrolled { --topbar-h: 60px; background: rgba(10, 27, 101, .985); box-shadow: 0 10px 30px rgba(6, 15, 60, .28); }
.topbar__inner { display: flex; align-items: center; gap: 20px; height: var(--topbar-h); transition: height .25s; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand__mark { display: grid; transition: transform .25s; }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
.brand__text { font-size: 1.22rem; font-weight: 500; letter-spacing: -.02em; }
.brand__text strong { font-weight: 800; color: var(--accent); margin-left: 1px; }

/* Hauptnavigation – Desktop */
.mainnav { margin-left: auto; display: flex; align-items: center; }
.mainnav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.mainnav__item { position: relative; display: flex; align-items: center; }
.mainnav__link {
  position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 13px;
  color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; font-size: .94rem; letter-spacing: -.005em;
  border-radius: 10px; transition: color .15s, background .15s;
}
.mainnav__link:hover, .mainnav__item.is-open > .mainnav__link { color: #fff; background: rgba(255,255,255,.07); }
.mainnav__link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.mainnav__link[aria-current="page"], .mainnav__link.is-spy { color: #fff; }
.mainnav__link[aria-current="page"]::after, .mainnav__link.is-spy::after { transform: scaleX(1); }
.has-sub > .mainnav__link { padding-right: 4px; }
.mainnav__subtoggle {
  display: grid; place-items: center; width: 26px; height: 40px; margin-left: -2px; padding: 0;
  background: none; border: 0; color: rgba(255,255,255,.7); cursor: pointer; border-radius: 8px;
}
.mainnav__subtoggle:hover { color: #fff; }
.chev { transition: transform .2s; }
.mainnav__item.is-open .chev { transform: rotate(180deg); }
.mainnav__extra { display: none; }

/* Mega-Menü Stadtbezirke */
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; width: 520px; padding: 18px;
  background: #fff; color: var(--text); border-radius: 18px; box-shadow: 0 24px 60px rgba(6, 15, 60, .28), 0 0 0 1px rgba(10,27,101,.06);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.mega::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }  /* Hover-Brücke */
.mega::after { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.mainnav__item.is-open > .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 1081px) {
  .has-sub:hover > .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .has-sub:hover .chev { transform: rotate(180deg); }
}
.mega__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.mega__title { font-weight: 800; color: var(--heading); font-size: 1rem; }
.mega__sub { font-size: .76rem; color: var(--muted); }
.mega__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.mega__link { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--heading); font-size: .9rem; font-weight: 600; transition: background .12s; }
.mega__link:hover, .mega__link:focus-visible { background: var(--soft); color: var(--heading); }
.mega__link[aria-current="page"] { background: var(--accent-soft); }
.mega__dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(10,27,101,.12); }
.mega__val { font-size: .78rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.mega__all { display: block; margin-top: 10px; padding: 11px 12px; border-radius: 10px; background: var(--soft); color: var(--primary-2); font-weight: 700; font-size: .88rem; text-decoration: none; text-align: center; }
.mega__all:hover { background: var(--primary); color: #fff; }

/* Werkzeuge rechts */
.topbar__tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.livepill {
  --aqi: #B8BED3;
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px;
  border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.75); text-decoration: none; font-size: .82rem; white-space: nowrap; transition: background .15s, border-color .15s;
}
.livepill:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.livepill strong { color: #fff; font-weight: 750; }
.livepill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--aqi); box-shadow: 0 0 0 0 var(--aqi); animation: pillpulse 2.4s infinite; }
@keyframes pillpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--aqi) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.livepill__val { padding-left: 8px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.18); font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); font-weight: 600; }
.livepill__val small { font-size: .72rem; color: rgba(255,255,255,.55); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .livepill__dot { animation: none; } .mega, .mainnav__link::after { transition: none; } }

.langswitch { display: inline-flex; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 3px; }
.langswitch a { color: rgba(255,255,255,.72); text-decoration: none; font-size: .76rem; font-weight: 750; letter-spacing: .05em; padding: 5px 9px; border-radius: 7px; transition: color .15s, background .15s; }
.langswitch a:hover { color: #fff; }
.langswitch a[aria-current="true"] { background: var(--accent); color: #fff; }

.navtoggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; cursor: pointer; }
.navtoggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .2s, top .25s; }
.navtoggle span:nth-child(1) { top: 15px; }
.navtoggle span:nth-child(2) { top: 21px; }
.navtoggle span:nth-child(3) { top: 27px; }
.navtoggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1240px) { .livepill__val { display: none; } }
@media (max-width: 1150px) { .livepill__label { display: none; } }

/* Mobil / Tablet */
@media (max-width: 1080px) {
  /* backdrop-filter würde das fixierte Panel auf die Header-Höhe begrenzen */
  .topbar, .topbar.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--primary); }
  .navtoggle { display: block; }
  .langswitch--bar { display: none; }
  .topbar__tools { margin-left: auto; }
  .mainnav {
    position: fixed; left: 0; right: 0; top: var(--topbar-h); bottom: 0; margin: 0;
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 24px;
    padding: 12px 16px 28px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--primary);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .mainnav.is-open { opacity: 1; visibility: visible; transform: none; }
  .mainnav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .mainnav__item { flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.08); }
  .mainnav__link { flex: 1; height: 56px; padding: 0 4px; font-size: 1.12rem; border-radius: 0; background: none !important; }
  .mainnav__link::after { left: 4px; right: auto; width: 24px; bottom: 10px; }
  .mainnav__subtoggle { width: 48px; height: 48px; background: rgba(255,255,255,.06); border-radius: 12px; }
  .mega {
    position: static; width: 100%; padding: 0; margin: 0 0 12px; background: none; box-shadow: none; color: #fff;
    opacity: 1; visibility: visible; transform: none; display: none; border-radius: 0;
  }
  .mega::before, .mega::after { display: none; }
  .mainnav__item.is-open > .mega { display: block; transform: none; }
  .mega__head { display: none; }
  .mega__grid { grid-template-columns: 1fr; gap: 2px; }
  .mega__link { color: rgba(255,255,255,.9); padding: 11px 12px; background: rgba(255,255,255,.04); }
  .mega__link:hover, .mega__link:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
  .mega__link[aria-current="page"] { background: rgba(253,126,20,.2); }
  .mega__val { color: rgba(255,255,255,.6); }
  .mega__all { background: rgba(255,255,255,.08); color: #fff; }
  .mainnav__extra { display: grid; gap: 14px; }
  .langswitch--panel { justify-self: start; }
  .langswitch--panel a { font-size: .9rem; padding: 8px 16px; letter-spacing: 0; }
  .btn--block { justify-content: center; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 480px) { .livepill { padding: 0 10px; } .livepill strong { font-size: .8rem; } .brand__text { font-size: 1.1rem; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(91,124,255,.35), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(253,126,20,.22), transparent 60%),
    linear-gradient(160deg, var(--primary) 0%, var(--primary-2) 100%);
  padding: 56px 0 64px;
}
.hero::after { /* Wupper-Welle */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: var(--surface);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 30c240-30 480-30 720 0s480 30 720 0v18H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 30c240-30 480-30 720 0s480 30 720 0v18H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: start; position: relative; z-index: 1; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.85); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.muted-inv { color: rgba(255,255,255,.6); font-weight: 500; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@media (prefers-reduced-motion: reduce) { .live { animation: none; } html { scroll-behavior: auto; } }
.hero__title { color: #fff; font-size: clamp(1.9rem, 4.4vw, 3.2rem); margin-bottom: 14px; }
.hero__advice { font-size: 1.12rem; color: rgba(255,255,255,.86); max-width: 42ch; }
.hero__pm { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 8px; }
.pm { display: grid; min-width: 150px; padding: 16px 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); }
.pm__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); font-weight: 650; }
.pm__value { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pm__value small { font-size: .5em; font-weight: 600; color: rgba(255,255,255,.55); }
.pm__unit { font-size: .85rem; color: rgba(255,255,255,.7); }
.pm--meta { background: transparent; }
.note { font-size: .92rem; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--text); }
.note--inv { margin-top: 18px; background: rgba(253,126,20,.12); color: rgba(255,255,255,.9); border-left-color: var(--accent); max-width: 62ch; }
.note--inv a { color: #FFC08A; }

/* AQI-Badge */
.aqi { display: inline-flex; align-items: center; gap: .45em; padding: .25em .7em; border-radius: 999px; background: var(--aqi); color: var(--aqi-text); font-weight: 750; font-size: .85rem; line-height: 1.3; white-space: nowrap; }
.aqi::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; opacity: .55; }
.aqi--xl { font-size: clamp(1.7rem, 4vw, 2.8rem); padding: .1em .55em; margin-top: .15em; letter-spacing: -.02em; }
.aqi--xl::before { display: none; }
.aqi--lg { font-size: 1.25rem; padding: .35em .9em; }
.aqi--sm { font-size: .78rem; }
.aqi--none { background: var(--soft); color: var(--muted); font-weight: 600; }
.aqi--none::before { display: none; }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card__title { font-size: 1.05rem; margin-bottom: 4px; }
.card__sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.hero__scale { color: var(--text); box-shadow: var(--shadow-lg); border: 0; }
.scale { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.scale__row { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: .92rem; }
.scale__row.is-current { background: var(--soft); outline: 2px solid var(--primary); font-weight: 700; }
.scale__dot { width: 14px; height: 14px; border-radius: 4px; }
.scale__range { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; }
.scale__legend { font-size: .78rem; color: var(--muted); text-align: right; margin: 8px 0 0; }

/* Sektionen */
.section { padding: 56px 0; }
.section--tiles { padding-top: 28px; }
.section--soft { background: var(--soft); }
.section__head { margin-bottom: 22px; }
.section__head p { color: var(--muted); margin: 0; }
.section__head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary-3); }
.tile--air::before { background: var(--accent); }
.tile--who::before { background: var(--accent-2); }
.tile__label { font-size: .82rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tile__value { font-size: 2.1rem; font-weight: 800; color: var(--heading); letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.tile__unit { font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tile__sub { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.trend { margin-left: auto; font-size: 1.4rem; color: var(--accent); }
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px 14px 14px 16px; }
  .tile__value { font-size: 1.6rem; }
  .tile__label { font-size: .72rem; }
  .tile__sub { font-size: .78rem; }
}
.meter { height: 8px; background: var(--soft); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.meter__bar { display: block; height: 100%; background: linear-gradient(90deg, #50CCAA, var(--accent)); border-radius: 99px; }
.meter__bar.is-over { background: linear-gradient(90deg, var(--accent), #FF5050); }

/* Segment-Buttons & Selects */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.section--soft .seg { background: #fff; }
.seg button { font: inherit; font-size: .88rem; font-weight: 650; border: 0; background: transparent; color: var(--muted); padding: 7px 13px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { color: var(--heading); }
.seg button[aria-selected="true"] { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(10,27,101,.25); }
.seg--sm { margin-bottom: 10px; }
.seg--sm button { padding: 5px 10px; font-size: .8rem; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.select select { font: inherit; font-size: .92rem; font-weight: 600; color: var(--heading); padding: 9px 36px 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230A1B65' stroke-width='2' fill='none'/%3E%3C/svg%3E") right 14px center no-repeat; -webkit-appearance: none; appearance: none; cursor: pointer; }

/* Karte */
.mapcard { padding: 0; overflow: hidden; position: relative; }
.map { height: 560px; background: var(--soft); }
.map--sm { height: 420px; }
@media (max-width: 720px) { .map { height: 440px; } .map--sm { height: 340px; } }
.map__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.map__legend:empty { display: none; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend__grad { width: 160px; height: 10px; border-radius: 99px; }
.mk { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: .78rem; font-weight: 800; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(10,27,101,.3); font-variant-numeric: tabular-nums; transition: transform .15s; }
.mk:hover { transform: scale(1.12); }
.mk.is-off { opacity: .45; filter: grayscale(.6); }
.mk.is-focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 14px 16px; font-size: .9rem; line-height: 1.5; min-width: 200px; }
.pop__title { font-weight: 800; color: var(--heading); font-size: 1rem; }
.pop__meta { color: var(--muted); font-size: .8rem; margin-bottom: 6px; }
.pop__grid { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 6px 0 10px; }
.pop__grid dt { color: var(--muted); }
.pop__grid dd { margin: 0; font-weight: 700; text-align: right; color: var(--heading); font-variant-numeric: tabular-nums; }
.dlabel { background: none; border: 0; box-shadow: none; font-weight: 750; font-size: .75rem; color: var(--primary); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; white-space: nowrap; }
.dlabel::before { display: none; }

/* Charts */
.chartcard { padding: 18px 18px 12px; }
.chart { position: relative; height: 360px; }
.chart--sm { height: 260px; }
.chart.is-loading::after { content: attr(data-loading); position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; background: rgba(255,255,255,.6); }
.chart.is-empty::after { content: attr(data-empty); position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* Bezirke */
.districts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.district { text-decoration: none; color: inherit; padding: 18px; transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; }
.district:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(253,126,20,.4); color: inherit; }
.district__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.district__head h3 { font-size: 1rem; margin: 0; }
.district__vals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px; }
.district__vals dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.district__vals dd { margin: 0; font-weight: 750; color: var(--heading); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.district__meta { font-size: .82rem; color: var(--muted); margin: auto 0 0; }
.link { color: var(--accent); font-weight: 650; }

/* CTA */
.section--cta { padding: 0 0 56px; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-3) 100%); color: #fff; border-radius: 22px; padding: 34px 36px; }
.wrap.cta { max-width: calc(var(--wrap) - 56px); }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.82); max-width: 60ch; margin: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; text-decoration: none; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(253,126,20,.35); }
.btn--accent:hover { background: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--heading); background: #fff; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Seitenkopf */
.pagehead { background: linear-gradient(160deg, var(--soft), #fff); border-bottom: 1px solid var(--line); padding: 36px 0 30px; }
.pagehead__split { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pagehead h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.pagehead h1 .muted a { color: inherit; text-decoration: none; }
.lead { font-size: 1.08rem; color: var(--text); max-width: 70ch; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 650; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B8BED3; }
.status.is-on { color: var(--ok); }
.status.is-on::before { background: #34D399; }
.lead .status { margin-right: 8px; }

/* Tabellen */
.tablewrap { margin-top: 20px; padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--soft); position: sticky; top: 0; cursor: pointer; user-select: none; }
.table thead th[aria-sort]::after { content: " ↓"; color: var(--accent); }
.table thead th[aria-sort="ascending"]::after { content: " ↑"; }
.table tbody tr:hover { background: #FAFBFE; }
.table tbody th a { font-weight: 750; text-decoration: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:last-child > * { border-bottom: 0; }
.chip { display: inline-block; font-size: .74rem; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--primary-2); border: 1px solid var(--line); margin-right: 4px; }
.chip--lg { font-size: .85rem; padding: 4px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.facts { display: grid; gap: 0; margin: 10px 0 18px; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--heading); }
.empty { text-align: center; padding: 40px 24px; }
.empty p { color: var(--muted); max-width: 52ch; margin: 0 auto 18px; }

/* Fließtext-Seiten */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose code, .code { font-family: ui-monospace, Menlo, monospace; font-size: .86em; background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--primary-2); }
.prose pre { background: var(--primary); color: #E8EBF4; padding: 16px 18px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; line-height: 1.5; }
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 1em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.fineprint { font-size: .82rem; color: var(--muted); margin-top: 18px; margin-bottom: 40px; }

/* Footer */
.footer { background: var(--primary); color: rgba(255,255,255,.75); padding: 52px 0 0; font-size: .92rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.brand--footer { color: #fff; margin-bottom: 10px; }
.footer__lead { max-width: 40ch; }
.footer__h { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding: 18px 16px 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }
@media (min-width: 720px) { .footer__bottom { padding-left: 28px; padding-right: 28px; } }
.footer__by { display: inline-flex; align-items: center; gap: 8px; opacity: .85; }
.footer__by img { height: 18px; width: auto; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 900px; }
.faq__item { padding: 0; box-shadow: none; }
.faq__item summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--accent); line-height: 1; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary h3 { margin: 0; font-size: 1.02rem; }
.faq__item p { padding: 0 22px 20px; margin: 0; color: var(--text); }

/* Scroll-Spy: Startseiten-Link tritt zurück, wenn ein Abschnitt aktiv ist */
.mainnav__link.is-muted::after { transform: scaleX(0); }
.mainnav__link.is-muted { color: rgba(255,255,255,.8); }
