* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: none;
    color: CanvasText;
    overflow: hidden;
}

body {
    display: flex;
    align-items: stretch;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.45;
    font-variant-ligatures: none;
}

.rail {
    flex: none;
    width: var(--dir-w, max-content);
    max-width: min(100%, 46rem);
    height: 100%;
    min-width: 0;
    overflow: hidden;
    visibility: visible;
    background: #fff;
    transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

html.is-directory-hidden .rail,
body.is-directory-hidden .rail {
    width: 0;
    visibility: hidden;
    transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 260ms;
}

body.is-directory-resizing .rail {
    transition: none;
}

.screen {
    width: max-content;
    max-width: min(100vw, 46rem);
    height: 100%;
    overflow: auto;
    padding: 20px 24px 28px;
    background: none;
    border: 0;
    color: #000;
}

@media (prefers-reduced-motion: reduce) {
    .rail {
        transition: none;
    }
}

.head {
    width: max-content;
    max-width: 100%;
    margin: 0;
    background: none;
    color: #000;
    white-space: nowrap;
}

.rule {
    height: 1px;
    margin-top: 10px;
    background: #000;
}

.tree {
    margin: 16px 0 0;
}

.row {
    display: flex;
    align-items: baseline;
    width: max-content;
    max-width: 100%;
    background: none;
    color: #000;
    white-space: nowrap;
}

.row[hidden] { display: none; }

.row.is-drop > .name {
    background: #000;
    color: #fff;
}

.row.is-dragging { opacity: 0.4; }

.toggle,
.toggle-spacer {
    flex: none;
    width: 1ch;
    padding: 0;
    color: inherit;
    font: inherit;
    line-height: 1.45;
    text-align: center;
}

.toggle {
    border: 0;
    background: none;
    cursor: pointer;
}

.glyph,
.name {
    color: inherit;
    line-height: 1.45;
}

.glyph { white-space: pre; }

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

.name { padding: 0 4px; }

.name.is-selected {
    background: aqua;
    color: #000;
    text-decoration: none;
}

.name.is-active,
.name.is-active.is-selected {
    background: yellow;
    color: #000;
}

.name:focus,
.toggle:focus,
.ver:focus {
    outline: none;
}

.versions {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2ch;
    margin-left: 0.8ch;
}

.ver {
    color: inherit;
    text-decoration: none;
    opacity: 0.45;
    padding: 0 0.35ch;
}

button.ver {
    border: 0;
    background: none;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
}

.ver[hidden] { display: none; }

.ver.is-on {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ver.is-active,
.ver.is-active.is-on {
    opacity: 1;
    background: yellow;
    color: #000;
    text-decoration: none;
}

.ver:hover {
    opacity: 1;
    background: aqua;
    color: #000;
    text-decoration: none;
}

.page {
    display: none;
    position: relative;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    border: 0;
    background: Canvas;
}

.page.is-open { display: block; }
