:root {
    color-scheme: light dark;
    --text-color: #000;
    --background-color: #fff;
    --primary-color: #00883A;
    --primary-color-hover: #00732A;
    --primary-color-active: #00621C;
    --secondary-background-color: #efefef;
    --primary-text-color: #fff;
    --border-color: #aaa;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    display: flex;
    justify-content: center;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--background-color);
}

body,
input,
select {
    font-family: "Roboto", Helvetica, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

#loading {
    margin: 16px;
}

#loading .loader {
    width: 160px;
    height: 160px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle fill="none" stroke-opacity="1" stroke="%2300732A" stroke-width=".5" cx="100" cy="100" r="0"><animate attributeName="r" calcMode="spline" dur="2" values="1;80" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate><animate attributeName="stroke-width" calcMode="spline" dur="2" values="0;25" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate><animate attributeName="stroke-opacity" calcMode="spline" dur="2" values="1;0" keyTimes="0;1" keySplines="0 .2 .5 1" repeatCount="indefinite"></animate></circle></svg>');
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

input,
select {
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-sizing: border-box;
}

main {
    width: 50%;
    max-width: 800px;
    min-width: calc(min(600px, max(80%, 400px)));
    margin-bottom: 32px;
    display: none;
}

footer {
    font-size: 0.8em;
    position: fixed;
    bottom: 16px;
    right: 16px;
}

h1 {
    margin: 16px;
    margin-top: 0.5em;
    padding: 0;
    font-weight: 300;
    font-size: 2.5em;
    text-align: center;
}

h3 {
    margin: 0.5em 0;
    padding: 0;
    font-size: 1em;
}

p {
    margin: 0.5em 0;
}

h1 span {
    font-size: 0.3em;
}

h1 img {
    height: 0.7em;
}

#config {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-background-color);
}

table {
    width: 100%;
    border-spacing: 0;
}

th,
td {
    margin: 0;
    padding: 4px;
}

thead th {
    text-align: left;
    border-bottom: 1px solid var(--text-color);
}

tr.group td {
    font-weight: bold;
}

tr td:last-child {
    text-align: right;
    width: 4em;
}

tr.criterion td:first-child {
    padding-left: 16px;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden
}

input:not([type="button"]) {
    width: 100%;
    box-sizing: border-box;
    appearance: textfield;
    margin: 0;
    padding: 1px 2px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="button"] {
    background-color: var(--primary-color);
    color: var(--primary-text-color);
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    margin: 0;
}

#export input[type="button"] {
    padding: 4px 6px;
}

input[type="button"]:hover {
    background-color: var(--primary-color-hover);
}

input[type="button"]:active {
    background-color: var(--primary-color-active);
}

tbody tr:last-child td {
    border-bottom: 1px solid var(--text-color);
}

#bottom {
    font-size: 1.15em;
    display: flex;
    gap: 16px;
}

#results {
    flex: 3;
}

#export {
    flex: 2;
}

#bottom p {
    padding-left: 16px;
}

#bottom p span {
    font-weight: bold;
}

#bottom .spacing {
    display: inline-block;
    width: 3em;

}

.fill {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.fill>* {
    flex-grow: 1;
}

#export h3 {
    position: relative;
    cursor: help;
}

#copied-status {
    display: none;
    opacity: 1;
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: right;
    font-weight: bold;
    font-size: 0.8em;
    color: var(--primary-color);
    transition: opacity 0.5s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #eee;
        --background-color: #222;
        --primary-color: #00883A;
        --primary-color-hover: #00732A;
        --primary-color-active: #00621C;
        --secondary-background-color: #333;
        --border-color: #666;
    }

    a {
        color: var(--text-color);
        font-style: italic;
    }
}