/* OpenPLZ Explorer – Farben nach meksoft.de */
:root {
  --primary: #0A1B65;
  --primary-700: #05103F;
  --navy: #1E2753;
  --accent: #FD7E14;
  --accent-600: #E86C05;
  --accent-soft: #FFF1E6;
  --red: #FB3F3F;
  --soft: #F1F4FD;
  --muted-blue: #B2B8D3;
  --text: #3B3B3B;
  --text-light: #6B7190;
  --border: #DEDEDE;
  --border-soft: #E8EBF5;
  --white: #FFFFFF;
  --ok: #1E9E6A;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(5, 16, 63, .05), 0 8px 24px rgba(5, 16, 63, .06);
  --shadow-lg: 0 20px 50px rgba(5, 16, 63, .14);
  --font-head: 'Inter', system-ui, sans-serif;
  --font-body: 'Heebo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--primary); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--soft); color: var(--primary); padding: .1em .4em; border-radius: 4px; }
img, svg { max-width: 100%; }
.ico { width: 1.1em; height: 1.1em; vertical-align: -.18em; flex-shrink: 0; }
.muted { color: var(--text-light); }
.small { font-size: .85rem; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Topbar & Header */
.topbar { background: var(--primary-700); color: var(--muted-blue); font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--accent); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border-soft); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--primary); }
.brand:hover { color: var(--primary); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #FF9A45); color: #fff; box-shadow: 0 6px 16px rgba(253,126,20,.35); }
.brand-mark .ico { width: 22px; height: 22px; }
.brand-text span { color: var(--accent); margin-left: 2px; }
/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .95rem; border: 1.5px solid transparent; border-radius: var(--radius-sm); padding: 12px 22px; cursor: pointer; transition: background .15s, color .15s, transform .15s, box-shadow .15s; line-height: 1.2; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(253,126,20,.28); }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost.danger { color: var(--red); }
.btn-ghost.danger:hover { border-color: var(--red); color: var(--red); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #1C2E8A 0%, transparent 60%), linear-gradient(160deg, var(--primary) 0%, var(--primary-700) 100%); color: #fff; padding: 88px 0 110px; }
.hero-bg { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(253,126,20,.35), transparent 65%); }
.hero-inner { position: relative; z-index: 1; max-width: 980px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: #D5D9EC; max-width: 720px; }
.hl { color: var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); background: rgba(253,126,20,.12); border: 1px solid rgba(253,126,20,.3); padding: 6px 12px; border-radius: 99px; margin-bottom: 22px; }

/* Searchbox */
.searchbox { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 14px; box-shadow: var(--shadow-lg); margin-top: 28px; max-width: 900px; }
.searchbox select, .searchbox input { font: inherit; border: 0; background: transparent; color: var(--text); outline: none; }
.searchbox select { padding: 0 12px; border-right: 1px solid var(--border); font-family: var(--font-head); font-weight: 600; color: var(--primary); max-width: 170px; cursor: pointer; }
.sb-input { position: relative; flex: 1; min-width: 0; }
.searchbox input { width: 100%; height: 100%; padding: 12px 10px; font-size: 1rem; }
.searchbox.big input { font-size: 1.08rem; padding: 16px 12px; }
.searchbox .btn { flex-shrink: 0; }
.page-hero .searchbox { margin-top: 22px; }
.suggest { position: absolute; left: -8px; right: -8px; top: calc(100% + 14px); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-soft); overflow: hidden; z-index: 40; text-align: left; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border-soft); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.sel { background: var(--soft); color: var(--primary); }
.suggest small { margin-left: auto; color: var(--text-light); font-size: .8rem; white-space: nowrap; }
.suggest .flag { width: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 22px; font-size: .9rem; }
.chips > span { color: var(--muted-blue); margin-right: 4px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.chips a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips-dark a { background: var(--soft); border-color: var(--border-soft); color: var(--primary); }
.chips-dark .flag { width: 18px; }

/* Stats strip */
.stats-strip { position: relative; z-index: 2; margin-top: -54px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; padding: 0; }
.stat { padding: 26px 18px; text-align: center; border-right: 1px solid var(--border-soft); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.stat span { font-size: .88rem; color: var(--text-light); }

/* Sections */
.section { padding: 80px 0; }
.section.soft { background: var(--soft); }
.section.pt-0 { padding-top: 36px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head.left { text-align: left; margin-left: 0; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.section-head p { color: var(--text-light); font-size: 1.05rem; }
.kicker { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .8rem; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.kicker::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--accent); vertical-align: middle; margin-right: 8px; }

/* Flags */
.flag { width: 22px; height: auto; border-radius: 3px; vertical-align: -.2em; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag-lg { width: 46px; border-radius: 5px; }
.flag-xl { width: 54px; border-radius: 6px; vertical-align: -.08em; margin-right: 6px; }

/* Country cards */
.country-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.country-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.country-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.country-card header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.country-card h3 { margin: 0; font-size: 1.25rem; }
.country-card p { color: var(--text-light); font-size: .93rem; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.mini-list { list-style: none; padding: 0; margin: 0 0 18px; font-size: .9rem; }
.mini-list li { padding: 5px 0; border-bottom: 1px dashed var(--border-soft); }
.mini-list li.more { color: var(--accent); border: 0; font-weight: 500; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--accent); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { display: block; background: #fff; border-radius: var(--radius); padding: 30px; border: 1px solid transparent; transition: .2s; color: var(--text); }
.feature:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.feature h3 { font-size: 1.15rem; margin: 16px 0 8px; }
.feature p { color: var(--text-light); font-size: .95rem; margin: 0; }
.f-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: var(--primary); color: var(--accent); }
.f-ico .ico { width: 26px; height: 26px; }

/* CTA */
.cta-band { background: linear-gradient(120deg, var(--primary) 0%, var(--navy) 100%); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cta-band h2 { color: #fff; font-size: 1.7rem; }
.cta-band p { color: #C8CDE4; margin: 0; }

/* Page hero */
.page-hero { background: linear-gradient(160deg, var(--primary) 0%, var(--primary-700) 100%); color: #fff; padding: 40px 0 46px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(253,126,20,.25), transparent 65%); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: .3em; }
.page-hero .lead { color: #C8CDE4; font-size: 1.05rem; max-width: 820px; margin: 0; }
.page-hero .lead .flag { width: 20px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--muted-blue); margin-bottom: 14px; }
.crumbs a { color: #fff; opacity: .85; }
.crumbs a:hover { color: var(--accent); opacity: 1; }
.plz-big { display: inline-block; background: var(--accent); color: #fff; padding: 2px 14px; border-radius: 10px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: stretch; }
.hero-facts .pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--accent); font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.fact { display: flex; flex-direction: column; padding: 7px 14px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.fact small { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-blue); }
.fact strong { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: #fff; }
.fact a { color: #fff; border-bottom: 1px dashed rgba(255,255,255,.4); }
.fact a:hover { color: var(--accent); }
.hero-actions { margin-top: 18px; display: flex; gap: 10px; }

/* Layout */
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.main-col, .side-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.side-col { position: sticky; top: 92px; }

/* Cards */
.card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
.main-col > .card, .side-col > .card { margin-bottom: 0; }
.card-body { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--border-soft); }
.card-head h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.card-title { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-title .ico { color: var(--accent); }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; background: #FBFCFF; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 15px 12px 13px; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--text-light); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--primary); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--primary); font-size: .75rem; font-weight: 700; text-align: center; }
.tabs a.active .count { background: var(--accent); color: #fff; }

/* Tiles & counts */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow); transition: .15s; color: var(--text); }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.tile-key { font-family: var(--font-head); font-weight: 700; font-size: .75rem; color: var(--accent); }
.tile-name { font-family: var(--font-head); font-weight: 700; color: var(--primary); }
.tile-sub { font-size: .8rem; color: var(--text-light); }
.count-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.count-card { padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--border-soft); box-shadow: var(--shadow); color: var(--text); transition: .15s; }
.count-card strong { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.count-card span { font-size: .85rem; color: var(--text-light); }
.count-card:hover { border-color: var(--accent); color: var(--text); }
.count-card.active { background: var(--primary); border-color: var(--primary); }
.count-card.active strong { color: var(--accent); }
.count-card.active span { color: #C8CDE4; }

/* Tables */
.result-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--text-light); margin-bottom: 14px; }
.result-meta strong { color: var(--primary); }
.meta-right { display: inline-flex; gap: 12px; align-items: center; }
.src { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 500; }
.src.cached { background: var(--soft); color: var(--primary); }
.src.live { background: var(--accent-soft); color: var(--accent-600); }
.apiurl { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--text-light); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-family: var(--font-head); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); background: var(--soft); padding: 11px 14px; white-space: nowrap; }
table.data td { padding: 11px 14px; border-top: 1px solid var(--border-soft); vertical-align: top; }
table.data tbody tr:hover { background: #FAFBFF; }
table.data td strong a, table.data td strong { color: var(--primary); }
table.data tr[hidden] { display: none; }
.plz { display: inline-block; font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-600); background: var(--accent-soft); padding: 1px 8px; border-radius: 6px; }
.plz:hover { background: var(--accent); color: #fff; }
.tag { display: inline-block; font-size: .74rem; font-weight: 500; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--navy); white-space: nowrap; }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--navy); }
.badge.ok { background: #E3F6EE; color: var(--ok); }
.badge.info { background: #E6ECFF; color: var(--primary); }
.badge.warn { background: #FFE9E9; color: var(--red); }
.icon-link { color: var(--text-light); }
.icon-link:hover { color: var(--accent); }
.empty { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty .ico { width: 36px; height: 36px; color: var(--muted-blue); }
.empty.big { padding: 70px 20px; background: #fff; border-radius: var(--radius); border: 1px dashed var(--border); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; }
.alert.error { background: #FFF0F0; color: #B42323; border: 1px solid #FFD0D0; }
.more-link { margin: 14px 0 0; font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.more-link a { color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }
.pager a, .pager span { min-width: 38px; padding: 7px 12px; border-radius: 8px; text-align: center; font-family: var(--font-head); font-weight: 600; font-size: .86rem; border: 1px solid var(--border-soft); color: var(--primary); }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .disabled { color: var(--muted-blue); }
.pager .gap { border: 0; min-width: 0; padding: 7px 2px; color: var(--text-light); }

/* Forms */
input, select, button { font: inherit; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--navy); }
.stack input, .filter-fields input, .ep-params input, .inline-form input, .inline-form select, .filter {
  font-family: var(--font-body); font-weight: 400; font-size: .95rem; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.stack input:focus, .filter-fields input:focus, .ep-params input:focus, .inline-form input:focus, .inline-form select:focus, .filter:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(253,126,20,.15); }
.check { flex-direction: row; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: inherit; cursor: pointer; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; }
.page-hero .check { color: #C8CDE4; margin-top: 12px; }
.page-hero .check code { background: rgba(255,255,255,.1); color: #fff; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { min-width: 220px; padding: 8px 12px; font-size: .88rem; }

.filter-panel { background: #fff; border-radius: 14px; padding: 18px; margin-top: 22px; box-shadow: var(--shadow-lg); max-width: 1000px; }
.filter-fields { display: grid; grid-template-columns: 1.4fr .7fr 1fr auto; gap: 12px; align-items: end; margin-top: 14px; }
.filter-panel .check { color: var(--text-light); margin-top: 12px; }
.filter-panel .check code { background: var(--soft); color: var(--primary); }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--soft); border-radius: 10px; padding: 4px; gap: 4px; }
.seg label { flex-direction: row; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--navy); font-size: .88rem; }
.seg label.on { background: #fff; box-shadow: var(--shadow); color: var(--primary); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.example-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.example { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--border-soft); box-shadow: var(--shadow); color: var(--text); }
.example:hover { border-color: var(--accent); color: var(--text); }
.example span { display: flex; flex-direction: column; flex: 1; }
.example strong { color: var(--primary); font-family: var(--font-head); }
.example small { color: var(--text-light); }
.example > .ico { color: var(--accent); }

/* Key-Value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: .9rem; }
.kv dt { color: var(--text-light); }
.kv dd { margin: 0; text-align: right; font-weight: 500; color: var(--primary); }
.loc-card .kv dd { text-align: left; }

/* PLZ */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.loc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border-soft); border-left: 4px solid var(--accent); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.loc-card h3 { font-size: 1.2rem; }

/* Entity list */
.ent-list { list-style: none; padding: 0; margin: 0; }
.ent-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.ent-list li:last-child { border-bottom: 0; }
.ent-list li > .flag, .ent-list li > .ico { margin-top: 4px; width: 20px; }
.ent-list div { display: flex; flex-direction: column; min-width: 0; }
.ent-list a { font-weight: 500; }
.ent-list small { color: var(--text-light); font-size: .8rem; }

/* Explorer */
.explorer { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px; align-items: start; }
.ep-list { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; margin: 0; }
.ep-list details { border-bottom: 1px solid var(--border-soft); }
.ep-list summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-family: var(--font-head); font-weight: 700; color: var(--primary); cursor: pointer; list-style: none; }
.ep-list summary::-webkit-details-marker { display: none; }
.ep-list summary .count { margin-left: auto; }
.ep-desc { font-size: .8rem; color: var(--text-light); padding: 0 18px; margin-bottom: 8px; }
.ep-list a { display: flex; align-items: center; gap: 8px; padding: 7px 18px; font-size: .82rem; color: var(--text); border-left: 3px solid transparent; }
.ep-list a code { background: none; padding: 0; color: inherit; word-break: break-all; }
.ep-list a:hover { background: var(--soft); }
.ep-list a.active { background: var(--accent-soft); border-left-color: var(--accent); color: var(--primary); font-weight: 600; }
.verb { flex-shrink: 0; font-family: var(--font-head); font-size: .66rem; font-weight: 800; color: #fff; background: var(--ok); padding: 2px 6px; border-radius: 4px; }
.verb.big { font-size: .85rem; padding: 4px 10px; }
.ep-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ep-title code { font-size: 1.05rem; background: none; padding: 0; font-weight: 600; word-break: break-all; }
.ep-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 18px 0; }
.ep-params label small.muted { font-weight: 400; font-family: var(--font-body); }
.ep-params label > span { display: flex; align-items: center; gap: 6px; }
pre.json { margin: 12px 0 0; max-height: 560px; overflow: auto; background: var(--primary-700); color: #E6E9F7; padding: 18px; border-radius: 10px; font-size: .82rem; line-height: 1.55; }
.copy-btn { float: right; }

/* Database */
.stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.scard { display: flex; flex-direction: column; gap: 2px; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border-soft); box-shadow: var(--shadow); }
.scard .ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 8px; }
.scard strong { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.scard span { font-size: .85rem; color: var(--text-light); }
.sync-actions { display: flex; gap: 10px; margin: 16px 0; }
.progress { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #FFA65C); transition: width .3s; }
.sync-log { max-height: 240px; overflow-y: auto; font-family: ui-monospace, Menlo, monospace; font-size: .76rem; background: var(--soft); border-radius: 8px; padding: 10px 10px 10px 40px; margin: 10px 0; color: var(--navy); }
.sync-log li.err { color: var(--red); }
.matrix td small { font-size: .72rem; }

/* Footer */
.site-footer { background: var(--primary-700); color: var(--muted-blue); padding: 64px 0 0; margin-top: 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.site-footer a { display: flex; align-items: center; gap: 8px; color: var(--muted-blue); padding: 4px 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { display: inline-flex; color: #fff; padding: 0; margin-bottom: 14px; }
.site-footer .brand:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); padding-block: 20px; font-size: .82rem; }

/* Responsive */
@media (max-width: 1080px) {
  .country-grid, .example-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .layout-side, .explorer { grid-template-columns: 1fr; }
  .side-col, .ep-list { position: static; max-height: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .hide-sm { display: none; }
  .hero { padding: 56px 0 92px; }
  .searchbox { flex-wrap: wrap; }
  .searchbox select { border-right: 0; border-bottom: 1px solid var(--border); width: 100%; max-width: none; padding: 10px 8px; }
  .searchbox .btn { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border-soft); }
  .stat:last-child { grid-column: span 2; }
  .country-grid, .feature-grid, .example-grid, .footer-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .filter-fields { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .filter { min-width: 0; width: 100%; }
  /* Tabellen als Karten */
  .table-wrap { border: 0; overflow: visible; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--border-soft); border-radius: 10px; margin-bottom: 10px; padding: 6px 0; }
  table.data td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 6px 14px; text-align: right; }
  table.data td::before { content: attr(data-label); font-family: var(--font-head); font-weight: 600; font-size: .74rem; text-transform: uppercase; color: var(--text-light); text-align: left; }
  table.data td[data-label=""]::before { content: ""; }
}

/* ===== Hauptmenü ===== */
.site-header { transition: box-shadow .2s, border-color .2s; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(5, 16, 63, .08); border-bottom-color: transparent; }
.header-inner { position: relative; gap: 28px; }
.main-nav { display: flex; align-items: center; flex: 1; gap: 20px; min-width: 0; }
.drawer-head, .nav-overlay { display: none; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: static; }
.nav-list > li.has-menu:not(:has(.mega)) { position: relative; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 5px; height: 72px; padding: 0 14px;
  font-family: var(--font-head); font-weight: 600; font-size: .93rem; color: var(--navy);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent); transform: scaleX(0); transition: transform .2s ease;
}
.nav-link:hover, .has-menu.open > .nav-link { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after, .has-menu.open > .nav-link::after { transform: scaleX(1); }
.nav-link.active { color: var(--primary); }
.chev { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; opacity: .7; }
.has-menu.open .chev { transform: rotate(180deg); }

/* Panels */
.menu {
  position: absolute; top: 100%; z-index: 60; background: #fff; border: 1px solid var(--border-soft);
  border-radius: 0 0 16px 16px; box-shadow: 0 24px 60px rgba(5, 16, 63, .16);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s;
}
.has-menu.open > .menu { opacity: 1; visibility: visible; transform: none; }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #FFA65C); }

/* Mega-Menü Länder */
.mega { left: 24px; right: 24px; padding: 28px; }
.mega-grid { display: grid; grid-template-columns: 1.35fr 1.1fr 1fr .85fr; gap: 0; }
.mega-col { display: flex; flex-direction: column; padding: 0 22px; border-right: 1px solid var(--border-soft); }
.mega-col:first-child { padding-left: 0; }
.mega-col:last-child { border-right: 0; padding-right: 0; }
.mega-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin: 0 -10px 12px; border-radius: 10px; color: var(--primary); }
.mega-head:hover { background: var(--soft); color: var(--primary); }
.mega-head span { display: flex; flex-direction: column; line-height: 1.25; }
.mega-head strong { font-family: var(--font-head); font-size: 1.02rem; }
.mega-head small { font-size: .78rem; color: var(--text-light); }
.mega-col.current .mega-head { background: var(--accent-soft); }
.flag-md { width: 34px; border-radius: 4px; }
.mega-links { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 1px 14px; }
.mega-links.two { grid-template-columns: 1fr 1fr; }
.mega-links a { display: block; padding: 4px 0; font-size: .86rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-links a:hover { color: var(--accent); }
.mega-links.pills { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.mega-links.pills a { text-align: center; padding: 5px 0; font-family: var(--font-head); font-weight: 700; font-size: .76rem; color: var(--primary); background: var(--soft); border-radius: 6px; }
.mega-links.pills a:hover { background: var(--accent); color: #fff; }
.mega-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border-soft); }
.mega-foot a { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--accent); }
.mega-foot a:hover { color: var(--accent-600); }

/* Dropdown Werkzeuge */
.dropdown { left: 0; width: 340px; padding: 10px; }
.dd-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 10px; color: var(--text); }
.dd-item:hover, .dd-item.current { background: var(--soft); color: var(--text); }
.dd-item span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.dd-item strong { font-family: var(--font-head); font-size: .92rem; color: var(--primary); }
.dd-item small { font-size: .8rem; color: var(--text-light); margin-top: 2px; }
.dd-ico { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--primary); color: var(--accent); }
.dd-item:hover .dd-ico { background: var(--accent); color: #fff; }
.dd-ext { display: flex; align-items: center; justify-content: space-between; margin: 6px 4px 2px; padding: 10px 8px 4px; border-top: 1px solid var(--border-soft); font-size: .82rem; font-weight: 500; color: var(--text-light); }

/* Suche im Header */
.nav-search { margin-left: auto; }
.nav-search .sb-input { display: flex; align-items: center; gap: 8px; width: 270px; height: 44px; padding: 0 10px 0 14px; background: var(--soft); border: 1.5px solid transparent; border-radius: 11px; transition: width .25s, border-color .15s, background .15s, box-shadow .15s; }
.nav-search .sb-input:focus-within { width: 340px; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(253,126,20,.12); }
.nav-search .sb-input > .ico { color: var(--text-light); }
.nav-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: .92rem; color: var(--text); }
.nav-search input::-webkit-search-cancel-button { display: none; }
.nav-search kbd { font-family: var(--font-head); font-size: .72rem; color: var(--text-light); background: #fff; border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; }
.nav-search .sb-input:focus-within kbd { display: none; }
.nav-search .suggest { left: 0; right: auto; width: 380px; top: calc(100% + 10px); }

/* Burger */
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 10px; background: var(--soft); cursor: pointer; }
.nav-toggle span { position: absolute; left: 12px; width: 20px; height: 2px; border-radius: 2px; background: var(--primary); transition: .2s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; width: 14px; }

@media (max-width: 1240px) {
  .nav-search .sb-input { width: 210px; }
  .nav-search .sb-input:focus-within { width: 270px; }
  .nav-link { padding: 0 11px; }
}

/* Mobile: seitliches Drawer-Menü */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(390px, 88vw);
    flex-direction: column; align-items: stretch; gap: 0; padding: 0 0 24px; overflow-y: auto;
    background: #fff; box-shadow: -20px 0 60px rgba(5, 16, 63, .25);
    transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s;
  }
  .main-nav.open { transform: none; visibility: visible; }
  .drawer-head { order: -2; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 2; }
  .drawer-title { font-family: var(--font-head); font-weight: 700; }
  .drawer-close { width: 38px; height: 38px; border: 0; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
  .nav-overlay { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(5, 16, 63, .5); backdrop-filter: blur(2px); }
  .nav-overlay[hidden] { display: none; }
  .nav-search { order: -1; margin: 16px 20px 6px; }
  .nav-search .sb-input, .nav-search .sb-input:focus-within { width: 100%; }
  .nav-search kbd { display: none; }
  .nav-search .suggest { width: auto; right: 0; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 8px 12px; }
  .nav-list > li, .nav-list > li.has-menu:not(:has(.mega)) { position: static; border-bottom: 1px solid var(--border-soft); }
  .nav-link { width: 100%; height: auto; padding: 15px 8px; justify-content: space-between; font-size: 1rem; }
  .nav-link::after { display: none; }
  .nav-link.active { color: var(--accent); }
  .menu { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 14px; }
  .menu::before { display: none; }
  .has-menu.open > .menu { display: block; }
  .mega-grid { grid-template-columns: 1fr; gap: 14px; }
  .mega-col, .mega-col:first-child, .mega-col:last-child { padding: 12px; border: 1px solid var(--border-soft); border-radius: 12px; }
  .mega-head { margin: -4px -4px 8px; }
  .mega-links.two { grid-template-columns: 1fr 1fr; }
  .dropdown { width: auto; }
  body.nav-open { overflow: hidden; }
}
@media (hover: none) { .hide-touch { display: none; } }

/* ===== Sprachumschalter ===== */
.topbar-right { display: inline-flex; align-items: center; gap: 18px; }
.lang-switch { display: inline-flex; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; padding: 2px; }
.lang-switch a { padding: 1px 9px; border-radius: 5px; font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .04em; color: var(--muted-blue); }
.lang-switch a:hover { color: #fff; }
.lang-switch a.on { background: var(--accent); color: #fff; }

/* ===== Footer unten ===== */
.footer-legal { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.site-footer .footer-bottom a { display: inline; padding: 0; }
.footer-agency a { color: #fff; font-weight: 600; }
.footer-agency a:hover { color: var(--accent); }

/* ===== Rechtliche Seiten ===== */
.legal { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 26px; align-items: start; }
.legal .card { margin: 0; }
.legal-toc { position: sticky; top: 92px; }
.legal-toc ol { margin: 0; padding-left: 20px; font-size: .9rem; }
.legal-toc li { padding: 4px 0; color: var(--text-light); }
.legal-toc a { color: var(--text); }
.legal-toc a:hover { color: var(--accent); }
.legal-body .card-body { padding: 32px 38px; }
.legal-sec { padding: 6px 0 22px; border-bottom: 1px solid var(--border-soft); margin-bottom: 22px; scroll-margin-top: 96px; }
.legal-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.legal-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; margin-bottom: 14px; }
.legal-no { display: inline-grid; place-items: center; min-width: 36px; height: 28px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-600); font-size: .8rem; font-weight: 800; }
.legal-sec p, .legal-sec li { color: var(--text); }
.legal-sec ul { padding-left: 20px; margin: 0 0 1em; }
.legal-sec a { color: var(--accent-600); text-decoration: underline; text-underline-offset: 2px; }
.legal-kv { max-width: 420px; }
.legal-kv dd { text-align: left; }
.alert.info-note { background: var(--soft); color: var(--primary); border: 1px solid var(--border-soft); }
@media (max-width: 1080px) {
  .legal { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
@media (max-width: 720px) {
  .legal-body .card-body { padding: 20px 18px; }
  .topbar-right { gap: 10px; }
}

/* ===== Admin-Anmeldung ===== */
.login-wrap { min-height: calc(100vh - 300px); display: grid; place-items: center; padding: 64px 16px; background: radial-gradient(900px 400px at 50% -10%, rgba(10,27,101,.08), transparent 70%), var(--soft); }
.login-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border-soft); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 36px 34px 28px; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.login-head { text-align: center; margin-bottom: 22px; }
.login-head .brand-mark { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 15px; display: grid; }
.login-head .brand-mark .ico { width: 28px; height: 28px; }
.login-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.login-head p { color: var(--text-light); font-size: .92rem; margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .btn { width: 100%; margin-top: 4px; }
.login-field { display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.login-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(253,126,20,.14); }
.login-field > .ico { color: var(--muted-blue); }
.login-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 13px 0; font: inherit; font-family: var(--font-body); font-weight: 400; font-size: 1rem; color: var(--text); }
.pw-toggle { border: 0; background: var(--soft); color: var(--primary); font-family: var(--font-head); font-weight: 600; font-size: .75rem; padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.login-foot { text-align: center; margin: 20px 0 0; font-size: .88rem; }
.alert.ok-note { background: #E3F6EE; color: var(--ok); border: 1px solid #BFE8D5; }
.admin-user { display: inline-flex; align-items: center; gap: 6px; color: #C8CDE4; font-size: .9rem; margin-right: 6px; align-self: center; }
