:root {
    --conec: #054D91;
    --conec-dark: #043a6e;
    --conec-bright: #2b8ff0;
    --bg-color: #030d1a;
    --panel-bg: linear-gradient(180deg, rgba(5, 77, 145, 0.94), rgba(4, 52, 100, 0.94));
    --panel-border: rgba(255, 255, 255, 0.18);
    --panel-schatten: 0 16px 48px rgba(0, 0, 0, 0.45);
    --card-bg: linear-gradient(180deg, rgba(5, 77, 145, 0.96), rgba(4, 45, 88, 0.96));
    --card-bg-hover: linear-gradient(180deg, rgba(10, 92, 168, 0.97), rgba(6, 55, 105, 0.97));
    --card-border: rgba(255, 255, 255, 0.18);
    --card-schatten: 0 18px 50px rgba(0, 0, 0, 0.42);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.74);
    --text-muted: rgba(255, 255, 255, 0.52);
    --beam-color: #8fd8ff;
    --warn: #ffc866;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --topbar-h: 136px;
    --footer-h: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    height: 100%;
    background: var(--bg-color);
}

body {
    min-height: 100%;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-primary);
    background: transparent;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0);
    background:
        radial-gradient(ellipse 70% 55% at 18% 0%, rgba(5, 77, 145, 0.42) 0%, rgba(3, 13, 26, 0) 62%),
        radial-gradient(ellipse 60% 50% at 92% 8%, rgba(43, 143, 240, 0.16) 0%, rgba(3, 13, 26, 0) 58%),
        var(--bg-color);
}

a { color: inherit; }

.skiplink {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 10px 16px;
    background: #fff;
    color: var(--conec);
    border-radius: 0 0 10px 0;
    font-weight: 600;
    text-decoration: none;
}

.skiplink:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--beam-color);
    outline-offset: 2px;
    border-radius: 6px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 28px 20px 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo-link {
    display: inline-block;
    text-decoration: none;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color-scheme: light;
    -webkit-appearance: none;
    forced-color-adjust: none;
}

.brand-logo-link:hover { transform: translateY(-1px); }

.brand-logo-link:focus-visible {
    outline: 2px solid var(--conec-bright);
    outline-offset: 3px;
}

.brand-logo {
    display: block;
    height: 64px;
    width: auto;
    background: transparent;
}

.viewswitch {
    display: flex;
    gap: 3px;
    padding: 4px;
    width: max-content;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.view-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.view-btn.is-active {
    background: #fff;
    color: var(--conec);
    cursor: default;
}

.view-btn.is-active:hover {
    background: #fff;
    color: var(--conec);
}

.lang-switch {
    width: 248px;
    display: flex;
    gap: 3px;
    padding: 4px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

.lang-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.66);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.lang-btn:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }

.lang-btn.is-active {
    background: #ffffff;
    color: var(--conec);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: default;
}

.shell {
    display: grid;
    grid-template-columns: 322px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 0 28px 28px;
    max-width: 1560px;
}

.pane {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

.pane-nav {
    background: var(--panel-bg);
    border-color: var(--panel-border);
    box-shadow: var(--panel-schatten);
    position: sticky;
    top: 16px;
    padding: 16px 14px;
    max-height: calc(100vh - var(--topbar-h) - var(--footer-h) - 20px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pane-detail {
    padding: 24px 26px 30px;
    min-height: 60vh;
}

.region-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.26);
    border-radius: 11px;
}

.region-tab {
    padding: 8px 4px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.region-tab:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.region-tab[aria-selected="true"] {
    background: var(--region-color, var(--conec-bright));
    color: #042039;
    cursor: default;
}

.search-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-muted);
}

.search-field input {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    font-family: inherit;
    font-size: 13.5px;
    color: #fff;
    background: transparent;
    border: 0;
}

.search-field input::placeholder { color: rgba(255, 255, 255, 0.42); }
.search-field input:focus { outline: none; }
.search-field:focus-within { border-color: rgba(143, 216, 255, 0.6); }

.navlist {
    overflow-y: auto;
    margin: 0 -6px -4px;
    padding: 0 6px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.navlist::-webkit-scrollbar { width: 8px; }
.navlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.nav-group {
    margin: 12px 0 5px;
    padding: 0 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-group:first-child { margin-top: 2px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }

.nav-item.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 600;
}

.nav-item.is-hub {
    border: 1px solid rgba(143, 216, 255, 0.34);
    background: rgba(43, 143, 240, 0.16);
    color: #fff;
}

.nav-item.is-hub.is-active { background: rgba(43, 143, 240, 0.3); }

.nav-item.is-sub { padding-left: 26px; font-size: 13.5px; }

.nav-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--region-color, var(--conec-bright));
}

.nav-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item.has-sub {
    align-items: flex-start;
    padding-top: 7px;
    padding-bottom: 7px;
}

.nav-item.has-sub .nav-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    white-space: normal;
}

.nav-label {
    font-size: 13.5px;
    line-height: 1.35;
    color: #fff;
}

.nav-sub {
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-count {
    flex: 0 0 auto;
    min-width: 22px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.nav-flag {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warn);
}

.detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

.detail-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--region-color, var(--conec-bright));
}

.detail-title {
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.detail-sub {
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--text-muted);
}



.section { margin-top: 26px; }

.section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.section-count {
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.section-note {
    margin-bottom: 12px;
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 62ch;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 12px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 13px;
    box-shadow: var(--card-schatten);
}

.card.is-hub {
    border-color: var(--card-border);
    border-top: 2px solid var(--beam-color);
    background: var(--card-bg);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: 18px;
    align-items: start;
    padding: 0;
    overflow: hidden;
}

.cards > .card.is-hub { grid-column: 1 / -1; }

.hub-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0 16px 16px;
}

.hub-bild {
    margin: 0;
    align-self: stretch;
    min-height: 190px;
}

.hub-bild img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 760px) {
    .card.is-hub {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .hub-text { padding: 15px 16px 16px; order: 2; }

    .hub-bild {
        order: 1;
        min-height: 0;
    }

    .hub-bild img {
        min-height: 0;
        aspect-ratio: 3 / 2;
        height: auto;
    }
}

.card-link {
    gap: 6px;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.card-link:hover {
    border-color: rgba(143, 216, 255, 0.5);
    background: var(--card-bg-hover);
    transform: translateY(-1px);
}

.card-link:focus-within {
    border-color: var(--beam-color);
}

.card-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0;
    font-family: inherit;
    text-align: left;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.card-open::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 13px;
}

.card-link { position: relative; }

.card-open:focus-visible { outline: none; }

.card-link:focus-within {
    outline: 2px solid var(--beam-color);
    outline-offset: 2px;
}

.card-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--beam-color);
    background: rgba(143, 216, 255, 0.14);
    transition: background 0.16s ease, transform 0.16s ease;
}

.card-link:hover .card-cta {
    background: rgba(143, 216, 255, 0.26);
    transform: translateX(2px);
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 5px 11px 5px 8px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.detail-back:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.card-logo {
    width: 100%;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: #fff;
    border-radius: 9px;
}

.card-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
}

.card-logo.is-platzhalter {
    padding: 10px 16px;
}

.logo-text {
    max-width: 100%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #3a4654;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-foto {
    display: block;
    width: 100%;
    height: 84px;
    border-radius: 9px;
    overflow: hidden;
}

.card-foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.person-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(143, 216, 255, 0.34);
}

.person-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.person-avatar.is-initialen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-color: rgba(255, 255, 255, 0.55);
    color: var(--conec);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
    user-select: none;
}

.person-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.card-sub {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.card-address {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-rows {
    display: grid;
    gap: 3px;
    font-size: 13px;
    margin-top: auto;
    padding-top: 2px;
}

.card-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
}

.card-row dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    padding-top: 2px;
}

.card-row dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-row a {
    color: var(--beam-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(143, 216, 255, 0.34);
}

.card-row a:hover { border-bottom-color: var(--beam-color); }

.person-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 2px 0 0;
    padding: 0;
}

.person-liste li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 10px;
    border-left: 2px solid rgba(143, 216, 255, 0.34);
}

.person-zeile-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
}

.person-zeile-gebiet {
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.62);
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
}

.badge.is-warn {
    background: rgba(255, 200, 102, 0.18);
    color: var(--warn);
}

.state {
    padding: 28px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: var(--footer-h);
    padding: 12px 28px 20px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.legal-link {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-link:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.6); }

@media (min-width: 769px) and (max-width: 1024px) {
    .topbar { padding: 22px 24px 18px 24px; }
    .brand-logo { height: 56px; }
}

@media (max-width: 1040px) {
    .shell {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 18px 22px;
    }

    .pane-nav {
        position: static;
        max-height: none;
    }

    .navlist { max-height: 46vh; }
}

@media (max-width: 768px) {
    .topbar { padding: 12px 14px 14px; }
    .brand { gap: 12px; }
    .brand-logo-link { padding: 8px 11px; border-radius: 10px; }
    .brand-logo { height: 40px; }
    .view-btn { padding: 6px 11px; font-size: 12px; }
    .view-btn .view-btn-text { display: none; }
}

@media (max-width: 560px) {
    .cards { grid-template-columns: minmax(0, 1fr); }
    .lang-switch { width: 100%; }
    .pane-detail { padding: 18px 16px 24px; }
    .card-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (max-width: 430px) {
    .brand-logo-link { padding: 7px 9px; }
    .brand-logo { height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

.karte {
    margin: 0 0 14px;
    padding: 16px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
}

.karte svg {
    display: block;
    width: 100%;
    height: auto;
}

.karte a.karte-flaeche { cursor: pointer; }

.karte a.karte-flaeche path {
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 1.1;
    stroke-linejoin: round;
}

.karte a.karte-flaeche:focus-visible {
    outline: 2px solid var(--conec-bright);
    outline-offset: 2px;
}

.karte .kuerzel {
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.72;
    pointer-events: none;
}

.karte .marke {
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.08em;
    stroke-width: 3.4;
    paint-order: stroke fill;
    pointer-events: none;
}

.karte-legende {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
}

.karte-legende-eintrag {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}

.karte-legende-eintrag:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.karte-legende-eintrag:focus-visible {
    outline: 2px solid var(--conec-bright);
    outline-offset: 2px;
}

.karte-punkt {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.karte-legende-name { font-size: 15px; font-weight: 600; }

.karte-legende-zahl {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

@media (max-width: 760px) {
    .karte { padding: 10px; border-radius: 12px; }
}
