.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.pageHeader {
    margin-bottom: 2rem;
}

.pageTitle {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.pageSubtitle {
    color: var(--ifm-color-emphasis-600);
    margin: 0;
}

.sectionHeader {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--ifm-color-primary-lightest);
    position: relative;
}

.sectionHeader::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--ifm-color-primary);
}

.sectionList {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--ifm-background-surface-color);
    margin-bottom: 2rem;
}

.featureCard {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    background: var(--ifm-background-surface-color);
    text-decoration: none !important;
    transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.featureCardLeft {
    min-width: 0;
}

.featureCard:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: var(--ifm-color-primary-lightest);
}

.featureTitleRow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featureTitleAndDate {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.featureTitle {
    font-weight: 700;
    font-size: 1.25rem;
}

.featureDescription {
    color: var(--ifm-color-emphasis-700);
    margin-top: 0.35rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.featureCardRight {
    margin-left: 1rem;
}

.featureMetaDate {
    color: var(--ifm-color-emphasis-600);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.featureMetaDateInline {
    color: var(--ifm-color-emphasis-600);
    font-size: 0.95rem;
}

.featureTitleRight {
    margin-left: auto;
    display: inline-flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

/* removed neutral variant to allow data-defined colors */

.discussionsIntro {
    color: var(--ifm-color-emphasis-700);
}

.tableWrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--ifm-toc-border-color);
    padding: 0.6rem 0.5rem;
    text-align: left;
}

.loading,
.empty,
.errorBox {
    padding: 0.75rem 1rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 6px;
    display: inline-block;
}

.errorBox {
    border-color: var(--ifm-color-danger);
}

.upvoteLink {
    font-weight: 600;
}

/* --- Cards view for discussions --- */
.cardsGrid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .cardsGrid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cardsGrid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.card {
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 10px;
    background: var(--ifm-background-surface-color);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: var(--ifm-color-primary-lightest);
}

.cardHeader {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.voteColumn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0.5rem;
}

.upvotePill {
    display: none;
}

.upvoteButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--ifm-toc-border-color);
    background: var(--ifm-color-emphasis-100);
    color: var(--ifm-color-emphasis-900);
    cursor: pointer;
    transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.upvoteButton:hover {
    background: var(--ifm-color-emphasis-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.upvoteIcon {
    display: block;
    margin: 0;
}

.upvoteCount {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.cardMain {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.cardTitle {
    font-weight: 700;
    line-height: 1.35;
    font-size: 1.05rem;
}

.metaRow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ifm-color-emphasis-600);
    font-size: 0.9rem;
}

/* Replace badge with GitHub-like comments link */
.commentsLink {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ifm-color-emphasis-700);
    text-decoration: none !important;
}

.commentsLink:hover {
    text-decoration: underline;
}

.commentIcon {
    opacity: 0.85;
    display: block;
}

.commentCount {
    font-weight: 500;
}

.createdAt {
    font-size: 0.9rem;
}

.labelsRow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.labelsRowInline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.labelChip {
    --chip-bg: var(--ifm-color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    background-color: color-mix(in oklab, var(--chip-bg) 18%, transparent);
    color: color-mix(in oklab, var(--chip-bg) 80%, black);
    border: 1px solid color-mix(in oklab, var(--chip-bg) 35%, transparent);
}

.labelIcon {
    font-size: 0.85rem;
    line-height: 1;
}

.metaSpacer {
    flex: 1 1 auto;
}

.actionsBar {
    display: flex;
    justify-content: flex-start;
    margin: 0.5rem 0 1rem;
}

.primaryAction {
    text-decoration: none !important;
}

.card {
    text-decoration: none !important;
}

/* Discussions controls */
.discussionsControls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--ifm-background-surface-color);
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 8px;
}

.sortControls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sortLabel {
    font-weight: 600;
    color: var(--ifm-color-emphasis-800);
}

.sortSelect {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 8px;
    background: var(--ifm-background-surface-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    color: var(--ifm-color-emphasis-900);
    font-size: 0.95rem;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    min-width: 140px;
}

.sortSelect:hover {
    border-color: var(--ifm-color-primary);
}

.sortSelect:focus {
    outline: none;
    border-color: var(--ifm-color-primary);
    box-shadow: 0 0 0 3px rgba(var(--ifm-color-primary-rgb), 0.1);
}

.resultsInfo {
    color: var(--ifm-color-emphasis-600);
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.paginationButton {
    padding: 0.5rem 1rem;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 6px;
    background: var(--ifm-background-surface-color);
    color: var(--ifm-color-emphasis-900);
    cursor: pointer;
    transition: all 150ms ease;
}

.paginationButton:hover:not(.disabled) {
    background: var(--ifm-color-primary-lightest);
    border-color: var(--ifm-color-primary);
}

.paginationButton.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.paginationNumbers {
    display: flex;
    gap: 0.25rem;
}

.paginationNumber {
    width: 40px;
    height: 40px;
    border: 1px solid var(--ifm-toc-border-color);
    border-radius: 6px;
    background: var(--ifm-background-surface-color);
    color: var(--ifm-color-emphasis-900);
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paginationNumber:hover {
    background: var(--ifm-color-primary-lightest);
    border-color: var(--ifm-color-primary);
}

.paginationNumber.active {
    background: var(--ifm-color-primary);
    color: white;
    border-color: var(--ifm-color-primary);
}