:root {
    color-scheme: light;
    --ink: #172326;
    --muted: #5d6c70;
    --line: #d5dedf;
    --paper: #f3f6f6;
    --card: #ffffff;
    --teal: #0e5c63;
    --notice: #fff6e8;
    --notice-line: #e2c48a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

a { color: var(--teal); }

.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.skip {
    position: absolute;
    left: -999px;
}

.skip:focus { left: 16px; top: 8px; background: white; padding: 8px; }

.top {
    background: #071426;
    color: white;
}

.top a { color: white; text-decoration: none; }

.top-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    min-height: 64px;
}

.brand { line-height: 0; }

.brand-logo {
    display: block;
    width: min(440px, 100%);
    height: auto;
    border-radius: 8px;
}

nav { display: flex; gap: 16px; }

.notice {
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--notice);
    border: 1px solid var(--notice-line);
    border-radius: 8px;
}

h1 { font-size: 1.8rem; line-height: 1.2; margin: 22px 0 8px; }

h2 { font-size: 1.15rem; margin: 0 0 8px; }

h3 { margin: 0 0 8px; font-size: 1rem; }

.lead { margin-top: 0; max-width: 68ch; }

.panel, .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.level {
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
    margin: 8px 0;
}

.level span { font-size: 1rem; color: var(--muted); }

.muted { color: var(--muted); }

.deltas { list-style: none; padding: 0; margin: 12px 0 0; }

.deltas li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid var(--line);
}

.legend { margin: 8px 0 0; padding-left: 18px; }
.legend li { margin: 6px 0; }

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.82rem;
    background: #e7eeee;
}

.badge.vollstaendig, .badge.success { background: #e5f4ec; color: #1f6b4a; }
.badge.lueckenhaft, .badge.teilweise, .badge.partial, .badge.veraltet { background: #fff1d6; color: #8a5a00; }
.badge.fehlend, .badge.failed, .badge.konflikt { background: #fdecec; color: #8a3030; }
.badge.quellenfakt, .badge.berechneter_fakt, .badge.kandidat { background: #e7f2f3; color: #0e5c63; }

blockquote {
    margin: 0;
    padding: 12px 14px;
    background: white;
    border-left: 4px solid var(--teal);
}

table { width: 100%; border-collapse: collapse; }

th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table-wrap { overflow-x: auto; }

.chart { width: 100%; height: auto; background: #f7fbfb; border-radius: 8px; }

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #132124;
    color: #e7f2f2;
    padding: 14px;
    border-radius: 8px;
    overflow: auto;
}

.foot { color: var(--muted); font-size: 0.92rem; padding-bottom: 28px; }

@media (max-width: 640px) {
    .top-row { align-items: flex-start; flex-direction: column; padding: 12px 0; }
    .brand-logo { width: min(320px, 100%); }
    h1 { font-size: 1.45rem; }
}
