@font-face {
    font-family: 'JetBrains Mono';
    src: 'fonts/JetBrainsMono-VariableFont_wght.ttf' format('tff supports variations');
    font-weight: 100 700;
}

@font-face {
    font-family: 'JetBrains Mono Italic';
    src: 'fonts/JetBrainsMono-Italic-VariableFont_wght.ttf' format('tff supports variations');
}

html {
    height: 100%;
}

ted-scrollbar {
    background: #c8c8c8;
    position: absolute;
    border-radius: 3px;
    cursor: default;
}

ted-editor {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 100;
    counter-reset: line;
}

ted-editor > .relative {
    position: relative;
    margin: 0 0 0 50px;
    display: inline-block;
    cursor: text;
    border-left: solid 1px #c9c9c9;
}

ted-header {
    position: relative;
    display: inline-block;
    border-bottom: solid 1px #c9c9c9;
    cursor: default;
    background: white;
    z-index: 1;
    min-width: 100%;
}

ted-header > span {
    line-height: 30px;
    font-size: 13px;
    font-family: monospace;
    margin: 15px;
}

nothing {
    color: #b22562;
}

ted-header > span:not(.active):hover {
    font-weight: 600;
    border-bottom: solid 2px #aff1c7;
}

ted-header > .active {
    border-bottom: solid 3px #e2c6ff;
}

ted-header > .unsaved::before {
    content: '\2022';
}

body {
    margin: 0;
    min-height: 100%;
    border: none;
    overflow: hidden;
    overscroll-behavior-x: none;
}

ted-line {
    /* pointer-events: none; */
    user-select: none;
    white-space: pre;
    font-weight: 100;
    width: 100%;
    padding-left: 1px;
    float: left;
}


ted-options > div {
    position: absolute;
    background: black;
    opacity: 0.7
}

.selection {
    pointer-events: none;
    background: #8ca8e8;
    opacity: 0.3;
    position: absolute;
}

.cursor {
    pointer-events: none;
    position: absolute;
    width: 2px;
    height: 21px;
    background: #000000;
}

ted-line.counted::before {
    counter-increment: line;
    content: counter(line);
    float: left;
    width: 18mm;
    margin-left: -20mm;
    text-align: right;
    color: #9e9e9e;
}

@media (prefers-color-scheme: dark) {
    html {
        background: #2b2b2b;
    }

    ted-header {
        background: #333333;
        border-bottom: solid 1px #736f6f;
        color: #7a7a7a;
    }

    .selection {
        background: #aeaebe;
    }

    .cursor {
        background : #fff;
    }

    ted-editor {
        color: #ddd;
    }

    ted-editor > .relative {
        border-left: solid #736f6f 1px;
    }

    ted-line.counted::before {
        color: #736f6f;
    }

    ted-scrollbar {
        background: #525252;
    }

    ted-header > span:not(.active):hover {
        font-weight: 600;
        border-bottom: solid 2px #2f6442;
    }

    ted-header > span.unsaved::before {
        content: "\2022"
    }

    ted-header > .active {
        border-bottom: solid 3px #694391
    }
}
