*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    background: #f6f5f2;
    color: #202020;
}

h2,
h3,
h4,
h5,
h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

ul {
    padding-left: 28px;
}

.container {
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 48px;
}

.site-header h1 {
    margin: 0;
    font-size: clamp(3rem, 9vw, 6.5rem);
    line-height: .95;
    letter-spacing: -.02em;
    padding-bottom: 26px;
}

.intro {
    max-width: 1000px;
    margin: 22px 0 0;
    font-size: 1rem;
}

    .intro a {
        color: inherit;
    }

    .intro li {
        font-size: 1rem;
    }

        .intro li a {
            color: inherit;
        }

.toc {
    margin-bottom: 48px;
    padding: 28px 30px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,.05);
}

    .toc h2 {
        margin: 0 0 22px;
        font-size: 1.25rem;
    }

.toc-group + .toc-group {
    margin-top: 24px;
}

.toc-group h3 {
    margin: 0 0 7px;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #777;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li + li {
    border-top: 1px solid #eceae5;
}

.toc a {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
}

    .toc a:hover span {
        text-decoration: underline;
    }

.toc time {
    color: #888;
    white-space: nowrap;
}

.post {
    scroll-margin-top: 26px;
    padding: 32px 0;
    border-top: 1px solid #d8d6d0;
    min-width: 0;
    overflow-wrap: anywhere;
}

    .post:first-child {
        border-top: 0;
    }

.post-meta {
    margin-bottom: 0px;
    font-size: 1rem;
    color: #777;
}

.post h1 {
    margin: 0 0 26px;
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.post h2 {
    margin-top: 20px;
}

.post p {
    max-width: 100%;
}

.post img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 26px 0;
    border-radius: 8px;
}

.post a {
    color: inherit;
}

.post ul {
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}

.back-to-top {
    display: block;
    margin-top: 0;
    font-size: .9rem;
    color: #777 !important;
    text-decoration: none;
    text-align: right;
}

    .back-to-top:hover {
        text-decoration: underline;
    }

code {
    padding: .1em .35em;
    background: rgba(0,0,0,.06);
    border-radius: 5px;
}

pre code {
    display: block;
    overflow-x: auto;
    padding: 16px;
}

@media (max-width: 100%) {
    .container {
        padding-top: 42px;
    }

    .toc {
        padding: 22px 20px;
    }

    .post {
        padding: 48px 0;
    }
}

.post-title {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.post-description {
    margin: 16px 0 0;
    max-width: 100%;
    font-size: 1.15rem;
    line-height: 1.55;
    color: #666;
}

.post-hero {
    display: block;
    width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 14px;
}

.post-content {
    margin-top: 26px;
}

    .post-content > :first-child {
        margin-top: 0;
    }

.time-counter {
    margin: 0;
    padding: 24px 0;
}

.time-counter-label {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: #777;
}

.time-counter-values {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 16px;
}

.time-counter-item {
    display: flex;
    flex-direction: column;
    min-width: 90px;
}

.time-counter-number {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.time-counter-unit {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #777;
}

@media (max-width: 600px) {
    .time-counter {
        padding: 16px 0;
    }

    .time-counter-values {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .time-counter-item {
        min-width: 0;
    }

    .time-counter-number {
        font-size: clamp(1.4rem, 7vw, 2rem);
    }

    .time-counter-unit {
        font-size: 0.65rem;
    }
}

.post-sort {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 20px;
    margin: 40px 0 24px;
    font-size: 0.85rem;
    color: #777;
}

.post-sort-buttons {
    display: flex;
    gap: 6px;
}

.sort-button {
    appearance: none;
    padding: 7px 12px;
    font: inherit;
    font-size: 0.8rem;
    color: #777;
    background: transparent;
    border: 1px solid #d8d6d0;
    border-radius: 20px;
    cursor: pointer;
}

    .sort-button:hover {
        color: #202020;
        border-color: #aaa;
    }

    .sort-button.active {
        color: #f6f5f2;
        background: #202020;
        border-color: #202020;
    }

@media (max-width: 600px) {
    .post-sort {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

.blog-navigation {
    margin: 40px 0 56px;
}


/* Sortierung */

.post-sort {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 20px;
    margin-bottom: 12px;
}

.post-sort-label {
    font-size: 0.85rem;
    color: #777;
}

.post-sort-buttons {
    display: inline-flex;
    padding: 3px;
    background: #e9e7e2;
    border-radius: 10px;
}

.sort-button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 7px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1;
    color: #666;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

    .sort-button:hover {
        color: #202020;
    }

    .sort-button.active {
        color: #202020;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    }

    .sort-button:focus-visible {
        outline: 2px solid #555;
        outline-offset: 2px;
    }


/* Inhaltsverzeichnis */

.toc {
    border-top: 1px solid #d8d6d0;
    border-bottom: 1px solid #d8d6d0;
}

    .toc summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 14px 0;
        cursor: pointer;
        list-style: none;
        font-size: 0.9rem;
    }

        .toc summary::-webkit-details-marker {
            display: none;
        }

        .toc summary::before {
            content: "";
            width: 6px;
            height: 6px;
            margin: 0 12px 0 3px;
            border-right: 1.5px solid currentColor;
            border-bottom: 1.5px solid currentColor;
            transform: rotate(-45deg);
            transition: transform 0.15s ease;
        }

    .toc[open] summary::before {
        transform: rotate(45deg);
    }

.toc-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #888;
}

.toc-list {
    margin: 0;
    padding: 0 0 16px;
    list-style: none;
}

.toc-item {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

    .toc-item a {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 24px;
        padding: 9px 0;
        color: inherit;
        text-decoration: none;
    }

        .toc-item a:hover .toc-title {
            text-decoration: underline;
        }

.toc-title {
    min-width: 0;
}

.toc-date {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #888;
    font-variant-numeric: tabular-nums;
}


/* Mobile */

@media (max-width: 600px) {

    .post-sort {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .post-sort-buttons {
        width: 100%;
    }

    .sort-button {
        flex: 1;
    }

    .toc-item a {
        gap: 12px;
    }
}

/* Einstieg für neue Leser */
.new-reader {
    margin: 30px 0 12px;
    padding: 18px 20px;
    border-left: 3px solid #202020;
    background: rgba(0, 0, 0, .025);
    font-size: .9rem;
    line-height: 1.55;
}


    .new-reader strong,
    .new-reader span {
        display: block;
    }

    .new-reader a {
        display: inline-block;
        margin-top: 7px;
        color: inherit;
        font-weight: 600;
        text-decoration: none;
    }

        .new-reader a:hover {
            text-decoration: underline;
        }

/* Überblicksseite */
.overview-header {
    padding-top: 28px;
}

.overview-back {
    display: inline-block;
    margin-bottom: 28px;
    font-size: .85rem;
    color: #777;
    text-decoration: none;
}

    .overview-back:hover {
        color: #202020;
    }

.overview-kicker {
    margin: 0 0 8px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #777;
}

.overview-header h1 {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    line-height: .98;
    letter-spacing: -.04em;
}

.overview-lead {
    max-width: 1000px;
    margin: 0;
    line-height: 1.7;
}

.overview-note {
    margin-top: 20px;
    max-width: 1000px;
    font-size: .86rem;
    line-height: 1.6;
    color: #777;
}

.reading-paths {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 34px 0 58px;
}

.reading-path {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
    border: 1px solid #d8d6d0;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

a.reading-path:hover {
    transform: translateY(-2px);
    border-color: #aaa;
    background: rgba(0, 0, 0, .018);
}

.reading-path-time {
    margin-bottom: 7px;
    font-size: .74rem;
    color: #888;
}

.reading-path strong {
    margin-bottom: 6px;
    font-size: 1rem;
}

.reading-path span:last-child {
    font-size: .84rem;
    line-height: 1.5;
    color: #666;
}

.overview-section {
    margin: 64px 0;
}

    .overview-section > h2 {
        margin: 0 0 10px;
        font-size: clamp(1.7rem, 4vw, 2.4rem);
        letter-spacing: -.025em;
    }

.overview-section-intro {
    max-width: 1000px;
    margin: 0 0 30px;
    color: #666;
}

.summary-box {
    padding: 24px 26px;
    border-left: 3px solid #202020;
    background: rgba(0, 0, 0, .025);
}

    .summary-box p:first-child {
        margin-top: 0;
    }

    .summary-box p:last-child {
        margin-bottom: 0;
    }

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.status-card {
    padding: 20px;
    border: 1px solid #d8d6d0;
    border-radius: 10px;
}

.status-card-label {
    display: block;
    margin-bottom: 7px;
    font-size: .74rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.status-card strong {
    display: block;
    margin-bottom: 7px;
}

.status-card p {
    margin: 0;
    font-size: .88rem;
    line-height: 1.55;
    color: #666;
}

.timeline {
    position: relative;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

    .timeline::before {
        content: "";
        position: absolute;
        top: 8px;
        bottom: 8px;
        left: 8px;
        width: 1px;
        background: #d8d6d0;
    }

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 28px;
    padding: 0 0 34px 34px;
}

    .timeline-item::before {
        content: "";
        position: absolute;
        left: 4px;
        top: 7px;
        width: 9px;
        height: 9px;
        border: 2px solid #202020;
        border-radius: 50%;
        background: #f6f5f2;
    }

.timeline-date {
    padding-top: 1px;
    font-size: .78rem;
    color: #777;
    font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
    margin: 0 0 7px;
    font-size: 1.06rem;
}

.timeline-content p {
    margin: 0 0 7px;
    line-height: 1.6;
    color: #555;
}

.timeline-link {
    font-size: .8rem;
    color: #777;
    text-decoration: none;
}

    .timeline-link:hover {
        color: #202020;
        text-decoration: underline;
    }

.topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.topic {
    padding: 20px;
    border: 1px solid #d8d6d0;
    border-radius: 10px;
}

    .topic h3 {
        margin: 0 0 8px;
        font-size: 1rem;
    }

    .topic p {
        margin: 0 0 12px;
        color: #666;
        font-size: .87rem;
        line-height: 1.55;
    }

    .topic a {
        font-size: .8rem;
        color: #555;
    }

.overview-footer {
    margin: 76px 0 20px;
    padding-top: 28px;
    border-top: 1px solid #d8d6d0;
}

    .overview-footer h2 {
        margin-top: 0;
    }

.overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.overview-button {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #bbb;
    border-radius: 8px;
    color: #202020;
    background: transparent;
    text-decoration: none;
    font-size: .84rem;
}

    .overview-button.primary {
        color: #f6f5f2;
        border-color: #202020;
        background: #202020;
    }

@media (max-width: 700px) {
    .reading-paths,
    .status-grid,
    .topics {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-left: 30px;
    }
}
