.funding-table { overflow-x: auto; margin-bottom: 1.75rem; }
.funding-table table { table-layout: auto; }
.funding-table td, .funding-table th {
    white-space: nowrap;
    text-align: left;
    padding: 12px 14px;
}
.funding-table td small { display: block; margin-top: 4px; color: #a3b4c8; }
.funding-table tbody tr:nth-child(4n+3) { background: #171c23; }
.funding-table :is(td, th):is(:nth-child(6), :nth-child(7)) {
    border-left: 1px solid #343c48;
}
.funding-table td:first-child, .funding-table .annual-rate { font-weight: 700; }
.funding-table .quote-missing { color: #97a3b4; font-size: .85em; }
.funding-table button {
    padding: 5px 8px;
    border: 1px solid #495061;
    border-radius: 6px;
    background: #202735;
    color: inherit;
    cursor: pointer;
}
.funding-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.funding-pay { color: #ff8995; }
.funding-receive { color: #66e5b1; }
.funding-table th:nth-child(n) { width: auto; }
@media (max-width: 700px) {
    .funding-table thead { display: table-header-group; }
    .funding-table tbody { display: table-row-group; }
    .funding-table tr { display: table-row; }
    .funding-table td:nth-child(n) { display: table-cell; margin: 0; padding: 10px 12px !important; }
    .funding-table td:nth-child(n)::before { content: none; }
}
#history-dialog {
    width: min(30rem, 85vw);
    max-height: 80vh;
    overflow: auto;
    background: #141923;
    color: #e5e9f0;
    border: 1px solid #495061;
    border-radius: 12px;
    padding: 1.25rem;
}
#history-dialog::backdrop { background: #0009; }
#history-dialog li { margin-block: .4rem; }
.funding-table .spot-comparison[hidden] { display: none; }
.funding-table .spot-comparison td { white-space: normal; background: #141923; }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.spot-grid section { border: 1px solid #343c48; border-radius: 8px; padding: .75rem; overflow-wrap: anywhere; }
.spot-grid details { margin-top: .5rem; }
.funding-table td > button { margin-top: .4rem; }
main.funding-page { max-width: 1440px; }
.funding-table td, .funding-table th { padding-inline: 10px; }
.funding-table td:first-child,
.funding-table td.spot-source {
    white-space: normal;
    overflow-wrap: anywhere;
}
.funding-table td.spot-source { max-width: 12rem; }

.funding-table td .wallet-paused { color: #ff8995; }
