:root {
    --grund:   #1b1420;
    --flaeche: #261c2d;
    --knochen: #e8e0d4;
    --grau:    #a59cad;
    --blut:    #a3303f;
    --blut-hell: #e07486;
    --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --sans:  system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--grund); }

body {
    margin: 0;
    color: var(--knochen);
    font: 1rem/1.55 var(--sans);
}

main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 95%;
    margin: 0 auto;
    padding: 1rem 0 1rem;
}

/* Jeder Bereich ist eine eigene Fläche */
.hallo, .links, .rss {
    background: var(--flaeche);
    border: 1px solid #3f3248;
    padding: 1rem 1.2rem;
}

a { color: var(--knochen); }
a:hover { color: var(--blut-hell); }
a:focus-visible {
    outline: 3px solid var(--blut-hell);
    outline-offset: 3px;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; }

.leer { color: var(--grau); }
code  { color: var(--knochen); background: var(--grund); padding: 0.1em 0.4em; }

/* Begrüßung */
.hallo { border-left: 0.35rem solid var(--blut); }
.datum { margin: 0 0 0.5rem; color: var(--grau); }
.hallo h1 {
    font-size: clamp(2.6rem, 9vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

/* Linkbuttons */
.links ul { display: flex; flex-wrap: wrap; gap: 0.7rem 0.8rem; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--knochen);
    background: var(--grund);
    color: var(--knochen);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--blut);
    transition: transform 0.08s, box-shadow 0.08s, background 0.08s;
}
.btn:hover {
    background: var(--blut);
    color: var(--knochen);
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--blut);
}

/* RSS */
.rss h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.rss h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }

.neueste li,
.feedbeitraege li { padding: 0.55rem 0; border-bottom: 1px solid #3a2d43; }
.neueste li:last-child,
.feedbeitraege li:last-child { border-bottom: 0; }

.neueste a,
.feedbeitraege a { text-decoration: none; font-weight: 600; }
.neueste a:hover,
.feedbeitraege a:hover { text-decoration: underline; }

.meta { display: block; color: var(--grau); font-size: 0.875rem; }

.geteilt {
    display: grid;
    grid-template-columns: 14rem 1fr;
    gap: 1.2rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--blut);
}

.feedliste li { margin-bottom: 0.25rem; }
.feedliste a {
    display: block;
    padding: 0.35rem 0.7rem;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.feedliste a:hover { border-left-color: var(--blut-hell); }
.feedliste a[aria-current] {
    border-left-color: var(--blut);
    background: var(--grund);
    font-weight: 700;
}

@media (max-width: 40rem) {
    .geteilt { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
}

/* Footer und Änderungsprotokoll-Layer (ohne JavaScript, per Checkbox) */
.fuss {
    width: 95%;
    margin: 0 auto;
    padding: 0 0 1.5rem;
    color: var(--grau);
    font-size: 0.875rem;
}

.layer-schalter {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.layer-schalter:focus-visible + .fusslink {
    outline: 3px solid var(--blut-hell);
    outline-offset: 3px;
}

.fusslink { cursor: pointer; text-decoration: underline; }
.fusslink:hover { color: var(--blut-hell); }

.layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.layer-schalter:checked ~ .layer { display: flex; }

.layer-hintergrund {
    position: absolute;
    inset: 0;
    background: rgba(10, 6, 14, 0.85);
    cursor: pointer;
}

.layer-box {
    position: relative;
    width: min(32rem, 100%);
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--flaeche);
    color: var(--knochen);
    font-size: 1rem;
    border: 2px solid var(--knochen);
    box-shadow: 6px 6px 0 var(--blut);
}
.layer-box h2 { font-size: 1.5rem; margin-bottom: 1rem; }

.log li { padding: 0.6rem 0; border-bottom: 1px solid #3a2d43; }
.log .meta { display: inline; margin: 0 0.5rem; }

.schliessen { margin-top: 1.4rem; cursor: pointer; }
