html,
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
}

body.dark {
    background-color: #000;
    color: #E8ECF0;
}

#selector {
    margin: 0 1rem;
}

#topbar {
    display: flex;
    justify-content: space-between;
}

h1 {
    font-size: 1.5em;
}

small {
    display: inline-block;
}

#theme_switcher {
    text-align: right;
}

a {
    color: #36c;
    text-decoration: underline;
}

p {
    font-weight: bold;
}

#output {
    flex: 1;
    margin: 0 1rem;
}

.sr-only {
    position: absolute;
    top: -30em;
}

.table-container {
    max-width: 100vw;
    overflow-x: scroll;
}

table {
    border-collapse: collapse;
    width: 100%;
    border: thin solid #a2a9b1;
}

body.dark table {
    border: thin solid #515860;
}

table.sortable td,
table.sortable th {
    padding: 0.2em 0.4em;
    min-width: 8em;
    height: 2em;
    text-align: center;
    border: thin solid #a2a9b1;
}

body.dark table.sortable td,
body.dark table.sortable th {
    border: thin solid #515860;
}

table.sortable td.num,
table.sortable th.num {
    min-width: 4em;
}

table.sortable th {
    font-weight: bold;
    color: #202122;
    background-color: #e6e6e6;
    position: relative;
}

body.dark table.sortable th {
    color: #DDDEDF;
    background-color: #111317;
}

table.sortable th.no-sort {
    padding-top: 0.35em;
}

table.sortable th button {
    padding: 4px;
    margin: 1px;
    font-family: inherit;
    font-size: 100%;
    font-weight: bold;
    background: transparent;
    border: none;
    display: inline;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    outline: none;
    cursor: pointer;
}

body.dark table.sortable th button {
    color: #DDDEDF;
}

table.sortable th[aria-sort="descending"] span::after,
table.sortable th:not([aria-sort]) button:focus span::after,
table.sortable th:not([aria-sort]) button:hover span::after {
    content: "▼";
    color: currentcolor;
    font-size: 100%;
    position: absolute;
    right: 1rem;
}

table.sortable th[aria-sort="ascending"] span::after {
    content: "▲";
    color: currentcolor;
    font-size: 100%;
    position: absolute;
    right: 1rem;
}

table.show-unsorted-icon th:not([aria-sort]) button span::after {
    content: "▽";
    color: currentcolor;
    font-size: 100%;
    position: absolute;
    right: 1rem;
}

@media screen and (max-width: 600px) {
    table.show-unsorted-icon th:not([aria-sort]) button span::after {
        content: "";
    }
}

table.sortable tbody tr:nth-child(even) {
    background-color: #fff;
}

table.sortable tbody tr:nth-child(odd) {
    background-color: #ebf5ff;
}

body.dark table.sortable tbody tr:nth-child(even) {
    background-color: #222222;
}

body.dark table.sortable tbody tr:nth-child(odd) {
    background-color: #3a3f44;
}

table.sortable tbody tr td {
    border-right: 1px solid #a2a9b1;
}

body.dark table.sortable tbody tr td {
    border-right: 1px solid #515860;
}


.canvas-container {
    margin: auto;
    min-height: 75vh;
    max-width: 75vw;
}

canvas {
    border: 1px solid #ddd;
    margin: auto;
    width: 100%;
    height: 100%;
    margin-top: 1rem;
    padding: 1rem;
}

@media screen and (max-width: 600px) {
    canvas {
        max-width: 100vw;
    }
}

.menu {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    max-width: 100vw;
    overflow-x: scroll;
    scrollbar-width: none;
}

#footer {
    text-align: left;
    font-size: 0.7em;
    padding: 8px 0;
    margin: 0 1rem;
}
