main.download {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 8px;
}

.download__hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    background: rgba(18, 13, 36, 0.8);
    box-shadow: var(--glow);
}

.download__manifest {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.manifest__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.manifest__head h2 {
    margin: 4px 0 0;
}

.manifest__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.manifest__actions .btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
}

.manifest__note {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.download__list .section-head {
    margin-bottom: 10px;
}

.release-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.release-card {
    position: relative;
}

.release-card summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.release-card summary::-webkit-details-marker {
    display: none;
}

.release-card[open] .chevron i {
    transform: rotate(180deg);
}

.chevron i {
    transition: transform 0.2s ease;
}

.release-card__labels {
    display: flex;
    gap: 6px;
    align-items: center;
}

.label--latest {
    background: rgba(76, 201, 118, 0.14);
    color: #6dd39c;
    border: 1px solid rgba(76, 201, 118, 0.28);
}

.release-card h3 {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-card__body {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.release-card__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.release-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.release-card:not([open]) {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
}

.release-card[open] .release-card__body {
    max-height: 1200px;
    opacity: 1;
}

.release-card:not([open]) .muted {
    display: none;
}

.release-card__meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.muted {
    margin: 2px 0 0;
    color: var(--muted);
}

.release-card__notes {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.notes__content {
    color: var(--ink);
    line-height: 1.6;
}

.notes__content h1,
.notes__content h2,
.notes__content h3,
.notes__content h4 {
    margin: 0 0 8px;
}

.notes__content ul,
.notes__content ol {
    margin: 6px 0 6px 18px;
    color: var(--muted);
}

.notes__content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
}

.notice {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.notice--warn {
    background: rgba(255, 181, 111, 0.1);
    color: #ffc48a;
    border-color: rgba(255, 181, 111, 0.2);
}

.empty-state {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 768px) {
    .download__hero {
        padding: 18px;
    }

    .release-card__meta {
        align-items: flex-start;
    }

    .manifest__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .manifest__actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .manifest__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 346px) {
    .download__hero {
        padding: 12px;
    }

    .download__manifest {
        padding: 10px;
    }

    .manifest__head h2 {
        font-size: 18px;
    }

    .manifest__actions .btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}
