* {
    font-family: monospace;
}

html, body {
    margin: 0;
    height: 100%;

    color: var(--text);
    background-color: var(--background);
}

a {
    color: inherit;
}

a.title {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: '> ';
    padding-left: 1em;
}

input {
    color: var(--text);
    background-color: var(--background);
    border: 1px solid var(--border);
}

button {
    width: 9em;
    padding: 0.5em 1em;
    font-size: 1em;
    cursor: pointer;

    color: var(--text);
    background-color: var(--button-background);
    border: 1px solid var(--border);
}

button:disabled, input:disabled {
    cursor: not-allowed;
}

.title {
    font-size: 2em;
    font-weight: bold;
}

.vertical {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.horizontal {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.singleton {
    padding: 1em;
}

.stretch {
    align-self: stretch;
    min-height: 0;
    min-width: 0;
    flex: 1;
}

.cm-editor {
    height: 100%;
    font-size: small;
    border: 1px solid var(--border) !important;
}

.cm-editor.cm-focused {
    outline: none;
}

.cm-gutters {
    color: var(--text) !important;
    background-color: var(--button-background) !important;
    border-right: 1px solid var(--border) !important;
}

.cm-selectionBackground {
    background-color: highlight !important;
}

.cm-activeLine {
    background-color: var(--line-highlight) !important;
}

.cm-activeLineGutter {
    background-color: var(--gutter-highlight) !important;
}

@media (prefers-color-scheme: light) {
    :root {
        --text: #4d4d4c;
        --background: #ffffff;
        --button-background: #efefef;
        --border: #d6d6d6;

        --line-highlight: #efefef80;
        --gutter-highlight: #d6d6d6;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #c5c8c6;
        --background: #1d1f21;
        --button-background: #282a2e;
        --border: #373b41;

        --line-highlight: #282a2e80;
        --gutter-highlight: #373b41;
    }
}
