.row:has(> [data-news-archive]) { row-gap: 20px; }

.archive-list,
.archive-loading-cards {
    display: grid;
    gap: 14px;
}

.archive-list,
.archive-loading,
.archive-status,
.archive-feed-title,
.news-detail,
.event-detail,
.publication-archive,
.downloads-page {
    --archive-surface: #fff;
    --archive-ink: #172b3a;
    --archive-muted: #526777;
    --archive-border: #dce4e8;
    --archive-accent: #084fb9;
    --archive-soft: #eaf2fb;
    --archive-placeholder: #e8eef4;
    color: var(--archive-ink);
    font-family: Inter, sans-serif;
}

[data-theme="dark"] :is(.archive-list, .archive-loading, .archive-status, .archive-feed-title, .news-detail, .event-detail, .publication-archive, .downloads-page) {
    --archive-surface: #182b3c;
    --archive-ink: #e4edf5;
    --archive-muted: #afc0cf;
    --archive-border: #30495e;
    --archive-accent: #9ac4ff;
    --archive-soft: #203d5e;
    --archive-placeholder: #30495e;
}

.archive-card,
.archive-placeholder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: clamp(12px, 2vw, 20px);
    border: 1px solid var(--archive-border);
    border-radius: 14px;
    background: var(--archive-surface);
}

.archive-card:focus-within { border-color: var(--archive-accent); }

.archive-news-card {
    grid-template-columns: clamp(72px, 28%, 200px) minmax(0, 1fr);
    align-items: center;
}

.archive-list .archive-news-card .archive-card-title { margin-top: 0; }
.archive-news-card .archive-card-meta { margin-top: 8px; }

.archive-thumbnail {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    background: var(--archive-soft);
    color: var(--archive-accent);
    font-size: 25px;
}

.archive-thumbnail.has-image {
    width: clamp(70px, 15vw, 140px);
    aspect-ratio: 4 / 3;
}

.archive-news-card .archive-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    font-size: clamp(24px, 4vw, 36px);
}

.archive-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-card-body { min-width: 0; overflow-wrap: anywhere; }

.archive-card-meta,
.archive-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
    color: var(--archive-muted);
    font-size: .8125rem;
    line-height: 1.5;
}

.archive-list .archive-kind {
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--archive-soft);
    color: var(--archive-accent);
    font-weight: 600;
}

.archive-list .archive-card-title {
    margin: 6px 0 8px;
    font: 650 clamp(.875rem, 1.5vw, 1rem)/1.45 Sora, sans-serif;
}

.archive-list .archive-card-title a { color: var(--archive-ink); }
.archive-list a:hover { color: var(--archive-accent); text-decoration: underline; }
.archive-list .archive-thumbnail:hover { text-decoration: none; }

.archive-list :is(.archive-excerpt, .archive-meta) {
    margin: 0;
    color: var(--archive-muted);
    font: 400 .875rem/1.6 Inter, sans-serif;
}

.archive-list .archive-excerpt { margin-bottom: 8px; }
.archive-list .archive-meta { font-size: .8125rem; }

.archive-list .archive-tags,
.archive-share {
    color: var(--archive-accent);
    font: 600 .8125rem/1.5 Inter, sans-serif;
}

.archive-list .archive-tags { margin-top: 4px; }

.archive-list .archive-tags summary {
    width: fit-content;
    padding: 5px 0;
    cursor: pointer;
}

.archive-list .archive-tags ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 4px 0 8px;
    padding: 0;
    list-style: none;
}

.archive-list .archive-tags a { color: var(--archive-accent); }

.archive-share { position: relative; }
.archive-share summary {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    cursor: pointer;
    gap: 7px;
    min-height: 44px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    list-style: none;
}
.archive-share summary::-webkit-details-marker { display: none; }
.archive-share summary i { font-size: 1rem; line-height: 1; }
.archive-share[open] summary,
.archive-share summary:hover { background: var(--archive-soft); }
.archive-share > ul {
    position: absolute;
    z-index: 5;
    inset-block-start: calc(100% + 6px);
    inset-inline-end: 0;
    inline-size: max-content;
    min-inline-size: 10.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border: 1px solid var(--archive-border);
    border-radius: 12px;
    background: var(--archive-surface);
    box-shadow: 0 8px 16px rgb(19 42 57 / 12%);
}
.archive-share:not([open]) > ul { display: none; }
.archive-share > ul > li {
    margin: 0;
    padding: 0;
}
.archive-share > ul a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 5px 7px;
    border-radius: 7px;
    color: var(--archive-ink);
    white-space: nowrap;
}
.archive-share > ul a i {
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--archive-soft);
    color: var(--archive-accent);
    font-size: .9rem;
    line-height: 1;
}
.archive-share > ul a:is(:hover, :focus-visible) {
    background: var(--archive-soft);
    color: var(--archive-accent);
    text-decoration: none;
}

.archive-share :is(summary, a):focus-visible {
    outline: 2px solid var(--archive-accent) !important;
    outline-offset: 2px;
}

.archive-list :is(a, summary):focus-visible,
.archive-status button:focus-visible {
    outline: 2px solid var(--archive-accent);
    outline-offset: 3px;
}

.archive-list .archive-event-meta {
    display: grid;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--archive-muted);
    font-size: .875rem;
    line-height: 1.55;
}

.archive-event-meta dt { color: var(--archive-ink); font-weight: 600; }
.archive-event-meta dd { margin: 0; }

.archive-feed-title {
    margin: 0 0 12px;
    font: 650 1rem/1.5 Sora, sans-serif;
}

.archive-pagination { margin: 20px 0 30px; }

.archive-list .archive-status,
.archive-status {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--archive-border);
    border-radius: 14px;
    background: var(--archive-surface);
}

.archive-status button {
    display: block;
    min-height: 44px;
    margin-top: 10px;
    padding: 7px 12px;
    border: 1px solid var(--archive-accent);
    border-radius: 7px;
    background: var(--archive-soft);
    color: var(--archive-accent);
    font: 600 .875rem/1.4 Inter, sans-serif;
    cursor: pointer;
}

.archive-status button:hover { text-decoration: underline; }

.archive-loading-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: var(--archive-muted);
    font: 600 .875rem/1.5 Inter, sans-serif;
}

.archive-loader {
    width: 16px;
    height: 16px;
    border: 2px solid var(--archive-border);
    border-top-color: var(--archive-accent);
    border-radius: 50%;
    animation: archive-spin .8s linear infinite;
}

.archive-placeholder > span {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--archive-placeholder);
}

.archive-placeholder > div {
    display: grid;
    gap: 10px;
    align-self: center;
}

.archive-placeholder > div > span {
    width: 78%;
    height: 12px;
    border-radius: 4px;
    background: var(--archive-placeholder);
}

.archive-placeholder > div > span:last-child { width: 53%; }

.archive-event-feed + .archive-event-feed { margin-top: 22px; }

@keyframes archive-spin { to { transform: rotate(360deg); } }

@media (min-width: 992px) {
    .archive-event-feed + .archive-event-feed { margin-top: 0; }
}

@media (max-width: 575.98px) {
    .archive-card, .archive-placeholder { gap: 10px; }
    .archive-thumbnail, .archive-placeholder > span { width: 44px; }
    .archive-placeholder > span { height: 44px; }
    .archive-thumbnail.has-image { width: 64px; }
    .archive-news-card .archive-thumbnail { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .archive-loader { animation: none; }
}
