/* ----- RESET & GLOBALS (Seriös, wissenschaftlich, modern) ----- */
:root {
    --bg: #f8fafc;
    --bg2: #ffffff;
    --card: #ffffff;
    --line: #e2e8f0;
    --line-dark: #cbd5e1;
    --text: #1e293b;
    --muted: #64748b;
    --brand: #2c3e66;
    --brand-light: #4a6a8f;
    --accent: #9e2d2f;
    --header-blur: rgba(255, 255, 255, 0.96);
}

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

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    scroll-behavior: smooth;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--brand-light);
    border-bottom: 1px solid var(--brand-light);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* ----- HEADER (MOBIL-OPTIMIERT) ----- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-blur);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    flex-wrap: nowrap;
}

.brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
}

.brand .logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #1a2a3e);
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
    flex-shrink: 1;
}

.brand h1 {
    font-size: clamp(0.75rem, 3vw, 1rem);
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.brand small {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: clamp(0.6rem, 2vw, 0.8rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop navigation */
.navlinks {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.navlinks a {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.navlinks a.active,
.navlinks a:hover {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

/* Hamburger Button */
.hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.hamburger:hover {
    background: var(--bg2);
    border-color: var(--brand-light);
}

/* Mobile menu (wird per JS getoggelt) */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
    width: 100%;
}

.mobile-menu a {
    color: var(--muted);
    font-weight: 500;
    padding: 0.6rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
    transition: all 0.2s;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a.active {
    color: var(--brand);
    background: none;
    padding-left: 0.5rem;
    border-left: 2px solid var(--brand);
}

.mobile-menu a:hover {
    color: var(--brand);
    padding-left: 0.5rem;
}

/* ----- RESPONSIVE: BIS 880px (HAMBURGER) ----- */
@media (max-width: 880px) {
    .navlinks {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ----- RESPONSIVE: BIS 768px ----- */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .brand .logo {
        width: 36px;
        height: 36px;
    }
    .brand h1 {
        font-size: 0.7rem;
        max-width: 150px;
    }
    .brand small {
        font-size: 0.55rem;
    }
    .hamburger {
        padding: 0.35rem 0.65rem;
        font-size: 1.2rem;
    }
    .card {
        padding: 1rem;
    }
    .card h3 {
        font-size: 1rem;
    }
    .cookie {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .cookie .btns {
        width: 100%;
        justify-content: center;
    }
    .btn {
        flex: 1;
        text-align: center;
    }
    footer .cols {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    .kpis {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
}

/* ----- RESPONSIVE: BIS 500px (EXTRA KLEIN) ----- */
@media (max-width: 500px) {
    .brand .logo {
        width: 30px;
        height: 30px;
    }
    .brand h1 {
        font-size: 0.6rem;
        max-width: 110px;
    }
    .brand small {
        font-size: 0.45rem;
        max-width: 110px;
    }
    .hamburger {
        padding: 0.3rem 0.55rem;
        font-size: 1.1rem;
    }
    .card {
        padding: 0.75rem;
    }
    .card h3 {
        font-size: 0.9rem;
    }
    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
}

/* ----- REST DES CSS (unverändert) ----- */

/* Hero Bereich */
.hero {
    padding: clamp(2rem, 6vw, 3rem) 0 clamp(1.5rem, 5vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.3;
    margin: 0 0 1rem;
    letter-spacing: -0.3px;
    color: var(--text);
    font-weight: 600;
}

.hero p {
    color: var(--muted);
    max-width: 850px;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.7;
}

/* KPIs */
.kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0 0.5rem;
}

.kpi {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0;
    text-align: left;
    transition: none;
    box-shadow: none;
    border-top: 2px solid var(--line);
}

.kpi:hover {
    box-shadow: none;
    border-color: var(--brand-light);
}

.kpi .n {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 700;
    background: none;
    color: var(--text);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.kpi .l {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Grid und Cards */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

.card {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border-color: var(--line-dark);
}

.card h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text);
    letter-spacing: -0.2px;
}

/* Badge */
.badge {
    display: inline-block;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.5rem;
    vertical-align: middle;
    font-weight: 500;
    border: 1px solid var(--line);
}

/* Section */
.section {
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    border-bottom: 1px solid var(--line);
}

.section h2 {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    margin: 0 0 1rem;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.lead {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.note {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.6;
}

/* Tabellen */
.table-wrapper {
    overflow-x: auto;
    margin: 1.25rem 0;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg2);
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.table th, .table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 0.85rem;
}

.table th {
    background: #f1f5f9;
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--line-dark);
}

.table tr:last-child td {
    border-bottom: 0;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-dark);
}

.t-item {
    position: relative;
    margin: 0 0 1rem 0;
    padding-left: 1.2rem;
}

.t-item:before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 50%;
}

 footer {
           
            background: #0f172a;
            color: #94a3b8;
            padding: 2rem 0;
            text-align: center;
            font-size: 0.8rem;
        }

        footer .cols {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            align-items: center;
            justify-content: space-between;
        }

        footer a {
            color: var(--muted);
            text-decoration: none;
        }
        
        footer a:hover { color: var(--brand); }

        .cookie {
            position: fixed;
            left: 1rem;
            right: 1rem;
            bottom: 1rem;
            background: #1e293b;
            border-radius: 12px;
            padding: 0.75rem 1.5rem;
            display: flex;
            gap: 1rem;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            z-index: 1000;
            color: white;
        }

        .cookie a { color: #94a3b8; }
        .cookie .btns { display: flex; gap: 0.5rem; }
        .btn {
            background: var(--brand);
            border: none;
            color: #fff;
            padding: 0.4rem 1rem;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.8rem;
        }
        .btn.secondary { background: #334155; }
/* Code-Blöcke */
code, pre, .code, .mono-display {
    font-family: 'SFMono-Regular', 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
}

code, .code {
    background: #0f172a;
    color: #38bdf8;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    border: 1px solid #1e293b;
}

pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
    border: 1px solid #1e293b;
}

pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
}

/* Globale Hilfsklassen */
button {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

p, li, .card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}