::view-transition-group(.article-element) {
    animation-duration: 320ms;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}

::view-transition-old(root) {
    animation: none;
    opacity: 0;
}

::view-transition-new(root) {
    animation: none;
}

::view-transition-old(.article-image) {
    display: none;
}

::view-transition-image-pair(.article-image) {
    overflow: clip;
}

::view-transition-new(.article-image) {
    animation: none;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: .35rem;
    mix-blend-mode: normal;
}

#inhalt:focus {
    outline: none;
}

.articles-main a {
    color: #286c7b;
    transition: color .15s;
}

.articles-main a:hover {
    color: #194b57;
    text-decoration: underline;
}

.articles-main a:focus-visible {
    outline: 3px solid #529aaa;
    outline-offset: 4px;
}

.articles-main {
    --article-reading-width: 52rem;
    --article-toc-width: 13rem;
    --article-toc-gap: 2rem;
    --article-toc-offset: 1.5rem;
    width: 100%;
    max-width: 90rem;
    padding: 3rem 1.5rem;
    flex: 1;
}

.articles-intro {
    padding: 1rem 0 2rem;
    max-width: 52rem;
}

.articles-eyebrow {
    color: #286c7b;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .06em;
}

.articles-main h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.articles-card {
    background: #fff;
    border-radius: .35rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.articles-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.articles-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.articles-card h2 {
    font-size: 1.4rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.articles-meta {
    font-size: .9rem;
    color: #515c6b;
}

.articles-read {
    font-weight: 600;
    margin-top: auto;
}

.articles-pagination {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.articles-breadcrumb {
    max-width: var(--article-reading-width);
    margin: 0 auto 2rem;
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.articles-detail-header {
    max-width: var(--article-reading-width);
    margin: 0 auto 2rem;
}

.articles-lead {
    font-size: 1.25rem;
    line-height: 1.6;
}

.articles-hero {
    margin: 0 auto 2rem;
    max-width: 68rem;
}

.articles-hero img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: .35rem;
    max-height: 25rem;
    object-position: center top;
}

.articles-hero figcaption {
    color: #515c6b;
    font-size: .85rem;
    padding-top: .5rem;
}

.articles-reading-layout {
    max-width: var(--article-reading-width);
    margin: 0 auto;
}

.articles-toc {
    margin-bottom: 2rem;
    font-size: .95rem;
}

.articles-toc h2 {
    font-size: 1.1rem;
}

.articles-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.articles-toc a {
    display: block;
    border-left: 3px solid transparent;
    border-radius: 0 .25rem .25rem 0;
    padding: .45rem .75rem;
    line-height: 1.45;
    text-decoration: none;
    transition: color .15s, background-color .15s;
}

.articles-toc a[aria-current="location"] {
    border-left-color: #286c7b;
    background-color: var(--aveo-primary--25);
    color: #194b57;
}

.articles-toc a:focus-visible {
    outline-offset: -3px;
    color: #194b57;
}

.articles-toc .articles-toc-sub a {
    padding-left: 1.5rem;
}

.articles-body {
    min-width: 0;
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    flex: 1;
}

.articles-body h2, .articles-body h3 {
    margin-top: 2rem;
    scroll-margin-top: 1rem;
    line-height: 1.3;
}

.articles-body img {
    max-width: 100%;
    height: auto;
    border-radius: .35rem;
}

.articles-body blockquote {
    border-left: 3px solid var(--aveo-primary);
    padding: .5rem 1.5rem;
    margin: 1.5rem 0;
}

.articles-body table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    border-collapse: collapse;
}

.articles-body td, .articles-body th {
    border: 1px solid #ccc;
    padding: .5rem;
}

.articles-body pre {
    overflow-x: auto;
    background: #fff;
    padding: 1rem;
}

.articles-author {
    max-width: var(--article-reading-width);
    margin: 2rem auto;
    padding-top: 1.5rem;
    border-top: 1px solid #cdd1d5;
}

.articles-author h2 {
    font-size: 1.2rem;
}

.articles-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0;
}

.articles-tags a {
    background: #529aaa20;
    border-radius: .25rem;
    padding: .25rem .75rem;
}

.articles-related {
    max-width: 68rem;
    margin: 3rem auto 0;
}

.articles-related > h2 {
    margin-bottom: 1.5rem;
}

.articles-preview {
    padding: 1rem;
    background: #fff1c4;
    border-left: 4px solid #80620d;
    margin-bottom: 2rem;
}

.articles-skip {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: white;
    padding: 1rem;
    z-index: 10;
}

.articles-skip:focus {
    top: 1rem;
}

/* Das Menü nutzt nur den freien Rand; der Lesetext bleibt in derselben mittigen Spalte. */
@media (min-width: 85rem) {
    .articles-reading-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .articles-toc, .articles-body {
        grid-area: 1 / 1;
    }

    .articles-toc {
        position: sticky;
        top: var(--article-toc-offset);
        align-self: start;
        width: var(--article-toc-width);
        transform: translateX(calc(-100% - var(--article-toc-gap)));
        margin-bottom: 0;
        max-height: calc(100vh - 2 * var(--article-toc-offset));
        overflow-y: auto;
    }
}

@media (max-width: 991px) {
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 575px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .articles-main {
        padding-top: 2rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none;
    }

    .articles-main a {
        transition: none;
    }

}
