body {
    background-color: #000000;
    color: #ffffff;
}

table {
    /* separate (not collapse) so borders don't drop out when cells are
       hidden/re-shown via display:none (Firefox border-repaint glitch) */
    border-collapse: separate;
    border-spacing: 0;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
//    color: #ffffff;
}

th,td {
    /* right/bottom only -> single-line grid, no doubling in separate mode */
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

thead th {
    position: sticky;
    top: 0;
    background: #000000;
    z-index: 10;
    box-shadow: inset 0 -1px 0 #ccc;
    text-align: center;
}

/* zebra stripes */
tbody tr:nth-child(even) {
   // background: #2c2c2c;
}

td a {
    display: block;
    color: #00FFFF;
    width: 100%;
    text-decoration: none;
}

/* Name text now sits above the preview image inside the preview cell. */
#toctable .name {
    text-align: center;
    padding-bottom: 4px;
}

/* Preset combobox. It inherits the body's white text color, which on mobile
   renders white-on-(native light) select background -> the selected label is
   invisible. Pin explicit dark-theme colors (desktop already overrode this,
   so it looked fine there), and keep it from being squeezed to nothing by the
   surrounding flex row. */
#preset {
    color: #ffffff;
    background-color: #000000;
    border: 1px solid #ccc;
    padding: 2px 4px;
    max-width: 100%;
    flex: 0 1 auto;
}
#preset option {
    color: #ffffff;
    background-color: #000000;
}

/* Preview thumbnail (click to open) with flanking ‹ › prev/next buttons */
.preview-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.preview-wrap img { cursor: pointer; }
.preview-wrap .nav {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 24px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font: 20px/1 Arial, sans-serif;
    cursor: pointer;
    opacity: 0.75;
}
.preview-wrap .nav:hover { opacity: 1; }
.preview-wrap .prev { left: 0; }
.preview-wrap .next { right: 0; }

/* Firefox-safe column hide (replaces `visibility: collapse` on <col>, which
   Firefox honors but which misaligns the colspan header). Hides the cells.
   Class-based so it works regardless of how many ref subcolumns the dataset
   produces; export.js tags the hideable <th>/<td> cells with these classes. */
#toctable.hide-ref .col-ref {
    display: none;
}

#toctable.hide-images .col-images {
    display: none;
}
