html {
    --bg-1: #fff;
    --bg-2: #e0e6eb;
    --bg-3: #c2cdd6;
    --fg-1: #212121;
    --fg-2: #4d4d4d;
    --link: #1c7ed4;
    --link-hover: #3492e5;
    --link-active: #176bb5;
}
html.dark {
    --bg-1: #2e2e2e;
    --bg-2: #4d4d4d;
    --bg-3: #666;
    --fg-1: #e6e6e6;
    --fg-2: #b3b3b3;
    --fg-3: #999;
    --link: #73c1fc;
    --link-hover: #91cefd;
    --link-active: #4baffb;
}

body {
    --border-radius: 2em;
    --font:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-mono:
        ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
        "DejaVu Sans Mono", monospace;
    background: var(--bg-1);
    color: var(--fg-1);
    font-family: var(--font);
    height: calc(100vh - 2rem);
    margin: 1rem;
    line-height: 1.5;

    transition: 0.1s ease-in-out;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    line-height: 1.1;
}
:is(h1, h2, h3, h4, h5, h6, p) {
    margin: 1rem 0.1rem;
}
label {
    margin: 0.5rem 0.1rem;
}
:is(h1, h2, h3, h4, h5, h6, p, label):first-child {
    margin-top: 0;
}
:is(h1, h2, h3, h4, h5, h6, p, label):last-child {
    margin-bottom: 0;
}

a {
    color: var(--link);
}
a:hover {
    color: var(--link-hover);
}

a:active {
    color: var(--link-active);
}

label {
    align-items: center;
    gap: 0.5rem;
    display: flex;
}
label input {
    margin: 0;
}
button,
input,
select {
    font-family: inherit;
    font-size: inherit;
}
button {
    background: var(--bg-1);
    color: var(--fg-1);
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-3);
    padding: 0.5rem 1rem;
}
button:hover {
    background: var(--bg-2);
}
button:active {
    background: var(--bg-3);
}
:is(button, button:hover, button:active):disabled {
    background: var(--bg-2);
    filter: grayscale();
    opacity: 0.4;
}
input,
textarea,
select {
    border: 1px solid var(--bg-2);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    padding: 0.5rem;
}
input,
textarea {
    background: var(--bg-1);
    color: inherit;
}
select:not([multiple]) {
    background: var(--bg-2);
}
textarea {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
form {
    flex-direction: column;
    align-items: baseline;
    gap: 1rem;
    display: flex;
}
ul:has(li):has(form) {
    padding: 0;
    list-style: none;
}
li form {
    flex-direction: row;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

ul:has(form) {
    padding: 0;
    list-style: none;
}
progress {
    margin: 0.5rem 0;
}
progress:first-child {
    margin-top: 0;
}
progress:last-child {
    margin-bottom: 0;
}
.error {
    color: red;
}
