/* Reference tables (/reference/, T-689). The wrapper scrolls sideways on a
 * narrow screen so a wide table never widens the page. Colours come from the
 * site variables, which dark-mode.css redefines. */
.reference-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.reference-table-wrap:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    color: var(--text-color);
    background: var(--background-color);
}

.reference-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    padding: 0.75rem 0.75rem 0.5rem;
    color: var(--text-color);
}

.reference-table th,
.reference-table td {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
    vertical-align: top;
    white-space: nowrap;
}

.reference-table thead th {
    background: var(--background-alt);
    white-space: normal;
    min-width: 6rem;
}

.reference-table th[scope="row"],
.reference-table thead th:first-child {
    text-align: left;
}

.reference-table td:last-child {
    white-space: normal;
    min-width: 10rem;
}

.reference-table tbody tr:nth-child(even) {
    background: var(--background-alt);
}

.reference-cite {
    font-size: 0.95rem;
    color: var(--text-light);
}
