:root {
    --background: #f4f6f8;
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    --text: #18212f;
    --text-soft: #465468;
    --text-muted: #718096;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --primary-border: #bfdbfe;

    --success: #15803d;
    --success-soft: #dcfce7;
    --success-border: #86efac;

    --statement: #7c3aed;
    --statement-soft: #f5f3ff;
    --statement-border: #ddd6fe;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    --code-background: #f1f5f9;

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 18px;

    --shadow:
        0 12px 36px
        rgba(15, 23, 42, 0.055);

    --content-width: 980px;
}


html[data-theme="dark"] {
    color-scheme: dark;

    --background: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c222b;

    --text: #f0f3f6;
    --text-soft: #c3cad4;
    --text-muted: #8b949e;

    --primary: #58a6ff;
    --primary-hover: #79b8ff;
    --primary-soft: #111d2f;
    --primary-border: #254b73;

    --success: #86efac;
    --success-soft: #12351f;
    --success-border: #2f855a;

    --statement: #c4a7ff;
    --statement-soft: #201731;
    --statement-border: #49346c;

    --border: #30363d;
    --border-hover: #484f58;

    --code-background: #0d1117;

    --shadow:
        0 12px 36px
        rgba(0, 0, 0, 0.24);
}


* {
    box-sizing: border-box;
}


html {
    color-scheme: light;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


body {
    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


button,
input,
select,
textarea {
    font: inherit;
}


.page {
    width: min(
        calc(100% - 32px),
        var(--content-width)
    );

    margin: 0 auto;

    padding:
        64px
        0
        48px;
}


/* Darkmode-Schalter */

.theme-toggle {
    position: fixed;

    top: 18px;
    right: 18px;

    z-index: 100;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 40px;

    padding:
        8px
        12px;

    color: var(--text-soft);

    background:
        color-mix(
            in srgb,
            var(--surface) 90%,
            transparent
        );

    border:
        1px solid
        var(--border);

    border-radius: 999px;

    box-shadow:
        0 5px 18px
        rgba(15, 23, 42, 0.08);

    backdrop-filter: blur(10px);

    cursor: pointer;

    font-size: 0.82rem;
    font-weight: 650;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}


.theme-toggle:hover {
    color: var(--text);

    border-color: var(--border-hover);

    transform: translateY(-1px);
}


.theme-icon {
    font-size: 1rem;
}


/* Header */

.hero {
    margin-bottom: 30px;
}


.eyebrow {
    display: inline-flex;

    margin-bottom: 12px;

    padding:
        5px
        10px;

    color: var(--primary);

    background: var(--primary-soft);

    border:
        1px solid
        var(--primary-border);

    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 650;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}


h1,
h2 {
    margin-top: 0;

    line-height: 1.2;
}


h1 {
    margin-bottom: 14px;

    font-size:
        clamp(
            2.1rem,
            6vw,
            3.3rem
        );

    letter-spacing: -0.04em;
}


h2 {
    margin-bottom: 6px;

    font-size: 1.3rem;

    letter-spacing: -0.015em;
}


.intro {
    max-width: 680px;

    margin: 0;

    color: var(--text-soft);

    font-size: 1.075rem;
}


/* Karten */

.card {
    margin-top: 24px;

    padding: 28px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: var(--radius-large);

    box-shadow: var(--shadow);
}


.section-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.section-header p {
    margin: 0;

    color: var(--text-muted);

    font-size: 0.94rem;
}


.badge {
    flex: 0 0 auto;

    padding:
        5px
        9px;

    color: var(--text-soft);

    background: var(--code-background);

    border:
        1px solid
        var(--border);

    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 600;
}


/* Bundesländer */

.state-list {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 12px;

    margin: 0;
    padding: 0;

    list-style: none;
}


.state-card {
    min-width: 0;

    padding: 16px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: var(--radius-medium);

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.state-card:hover {
    background: var(--surface-hover);

    border-color: var(--border-hover);

    box-shadow:
        0 5px 16px
        rgba(15, 23, 42, 0.05);

    transform: translateY(-1px);
}


.state-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin-bottom: 14px;
}


.state-name {
    min-width: 0;

    font-weight: 650;
}


.state-code {
    flex: 0 0 auto;

    padding:
        2px
        7px;

    color: var(--text-muted);

    background: var(--code-background);

    border-radius: 6px;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 0.75rem;
    font-weight: 650;
}


/* Buttons */

.state-actions {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 8px;
}


.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 40px;

    padding:
        8px
        11px;

    border-radius: var(--radius-small);

    font-size: 0.82rem;
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}


.button:hover {
    transform: translateY(-1px);
}


.button-primary {
    color: #ffffff;

    background: var(--primary);

    border:
        1px solid
        var(--primary);
}


html[data-theme="dark"] .button-primary {
    color: #0d1117;
}


.button-primary:hover {
    background: var(--primary-hover);

    border-color: var(--primary-hover);
}


.button-secondary {
    color: var(--text-soft);

    background: var(--surface);

    border:
        1px solid
        var(--border);
}


.button-secondary:hover {
    color: var(--text);

    background: var(--surface-hover);

    border-color: var(--border-hover);
}


/* Erfolgreich kopiert */

.button-copied,
.button-copied:hover {
    color: var(--success);

    background: var(--success-soft);

    border-color: var(--success-border);

    transform: none;
}


html[data-theme="dark"] .button-copied,
html[data-theme="dark"] .button-copied:hover {
    color: var(--success);

    background: var(--success-soft);

    border-color: var(--success-border);

    transform: none;
}


.button-icon {
    flex: 0 0 auto;

    font-size: 0.95rem;
}


/* Statement */

.statement-row {
    display: flex;

    justify-content: flex-end;

    margin-top: 18px;
}


.statement-sticker {
    display: inline-flex;

    align-items: center;

    max-width: 100%;

    padding:
        7px
        12px;

    color: var(--statement);

    background: var(--statement-soft);

    border:
        1px solid
        var(--statement-border);

    border-radius:
        5px
        12px
        6px
        10px;

    font-size: 0.76rem;
    font-weight: 750;

    line-height: 1.3;

    letter-spacing: 0.01em;

    text-align: center;

    transform: rotate(-2deg);
}


/* Optionen */

.options {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}


.option {
    min-width: 0;

    padding: 17px;

    background: var(--surface-hover);

    border:
        1px solid
        var(--border);

    border-radius: var(--radius-medium);
}


.option-title {
    margin-bottom: 9px;

    font-size: 0.9rem;
    font-weight: 650;
}


code {
    display: block;

    overflow-x: auto;

    padding:
        10px
        12px;

    color: var(--text-soft);

    background: var(--code-background);

    border:
        1px solid
        var(--border);

    border-radius: var(--radius-small);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 0.82rem;

    white-space: nowrap;
}


/* Hinweis */

.info {
    display: flex;

    gap: 14px;

    padding:
        18px
        20px;

    color: var(--text-soft);

    background: var(--primary-soft);

    border:
        1px solid
        var(--primary-border);

    border-radius: var(--radius-medium);
}


.info-icon {
    display: flex;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    color: var(--primary);

    background: var(--surface);

    border:
        1px solid
        var(--primary-border);

    border-radius: 50%;

    font-size: 1.05rem;
    font-weight: 700;
}


.info strong {
    color: var(--text);

    font-size: 0.92rem;
}


.info p {
    max-width: 720px;

    margin:
        3px
        0
        0;

    font-size: 0.88rem;
}


/* Footer */

footer {
    display: flex;

    align-items: center;
    justify-content: center;

    margin-top: 30px;

    color: var(--text-muted);

    font-size: 0.82rem;
}


footer a {
    color: var(--text-muted);

    text-decoration: none;
}


footer a:hover {
    color: var(--primary);
}


.footer-separator {
    margin:
        0
        8px;
}


/* Fokus */

a:focus-visible,
button:focus-visible {
    outline:
        3px solid
        color-mix(
            in srgb,
            var(--primary) 25%,
            transparent
        );

    outline-offset: 3px;
}


/* Responsive */

@media (max-width: 760px) {
    .page {
        width:
            min(
                calc(100% - 20px),
                var(--content-width)
            );

        padding:
            80px
            0
            36px;
    }


    .theme-toggle {
        top: 12px;
        right: 12px;
    }


    .card {
        padding: 20px;

        border-radius: var(--radius-medium);
    }


    .section-header {
        flex-direction: column;

        gap: 10px;
    }


    .state-list {
        grid-template-columns: 1fr;
    }


    .options {
        grid-template-columns: 1fr;
    }


    .badge {
        align-self: flex-start;
    }
}


@media (max-width: 440px) {
    .state-actions {
        grid-template-columns: 1fr;
    }


    .button {
        width: 100%;
    }


    .info {
        padding: 16px;
    }


    .theme-label {
        display: none;
    }


    .theme-toggle {
        width: 42px;
        height: 42px;

        padding: 0;
    }
}