figure.table {
    display: block;
    width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

figure.table table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    background: transparent;
    border-radius: 0.75rem;
    box-shadow: none;
    font-family: sans-serif;
}

figure.table th,
figure.table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
    font-size: 0.875rem;
    vertical-align: middle;
    white-space: nowrap;
}

figure.table th {
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 2;
}

figure.table tbody tr:hover {
    background: #e0f2fe;
    transition: background 0.2s ease;
}

.dark figure.table table {
    background: transparent;
    box-shadow: none;
}

.dark figure.table th,
.dark figure.table td {
    border: 1px solid #374151;
}

.dark figure.table thead tr {
    background: linear-gradient(to bottom, #374151, #1f2937);
}

.dark figure.table tbody tr:hover {
    background: #4b5563;
}

@media (max-width: 640px) {
    figure.table table {
        font-size: 0.75rem;
    }
    figure.table th,
    figure.table td {
        padding: 0.5rem 0.75rem;
    }
}