:root {
    --inset: clamp(20px, 14vw, 240px);
    --bg: #161616;
    --surface: #1d1d1d;
    --line: #2c2c2c;
    --rail-c: #4a4a4a;
    --dim: #6a6a6a;
    --mid: #8c8c8c;
    --soft: #a6a6a6;
    --accent: #bdbdbd;
    --fg: #d6d6d6;
    --hi: #e8e8e8;
    --teal-dim: #3e5553;
    --teal-mid: #5d7a77;
    --teal: #7a9895;
    --teal-hi: #9db6b3;
    --rail: 2ch;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    margin: 0;
    font-family: monospace, 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    line-height: 1.45;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 760px;
    margin-left: var(--inset);
    padding: 48px 20px 24px;
}

.branches {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 18px;
    margin: 0 0 28px calc(var(--rail) + 18px);
    font-size: .85rem;
}

.branches-label {
    color: var(--dim);
}

.branch {
    font: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--teal-mid);
}

.branch:hover {
    color: var(--teal-hi);
}

.branch:disabled {
    color: var(--line);
    cursor: default;
}

.branch-mark {
    display: inline-block;
    width: 2ch;
    color: transparent;
}

.branch.active {
    color: var(--teal-hi);
}

.branch.active .branch-mark {
    color: var(--teal-hi);
}

.branch-count {
    margin-left: 6px;
    color: var(--teal-dim);
    font-size: .75rem;
}

.branch:focus-visible {
    outline: 1px dashed var(--teal-mid);
    outline-offset: 3px;
}

.entry.filtered {
    display: none;
}

.log {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.entry {
    position: relative;
    padding: 6px 12px 18px calc(var(--rail) + 30px);
    margin-left: -12px;
    border-radius: 6px;
}

.entry:hover {
    background-color: var(--surface);
}

.node {
    position: absolute;
    left: 12px;
    top: 6px;
    width: var(--rail);
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.45;
    font-weight: bold;
    color: var(--rail-c);
}

.node::before {
    content: '*';
}

.entry::before,
.release::before {
    content: '|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|\A|';
    position: absolute;
    left: 12px;
    top: calc(6px + 1.15rem * 1.45);
    bottom: 0;
    width: var(--rail);
    text-align: center;
    white-space: pre;
    overflow: hidden;
    line-height: 1.45;
    color: var(--rail-c);
    opacity: .45;
}

.entry:hover .node {
    color: var(--accent);
}

.entry.head .node {
    color: var(--hi);
}

.tail::before {
    display: none;
}

.msg {
    font-size: 1.15rem;
    font-weight: normal;
    color: var(--fg);
    overflow-wrap: anywhere;
}

.type {
    display: inline-block;
    font-size: .7rem;
    font-weight: normal;
    padding: 1px 6px;
    margin-right: 10px;
    border-radius: 4px;
    vertical-align: middle;
    border: 1px solid currentColor;
    opacity: .85;
}

.type-won { color: var(--teal-hi); }
.type-organised { color: var(--teal); }
.type-taught { color: var(--teal); }
.type-competed { color: var(--teal-mid); }
.type-feat { color: var(--hi); }
.type-chore { color: var(--mid); }
.type-docs { color: var(--soft); }
.type-fix { color: var(--accent); }

.meta {
    font-size: .75rem;
    color: var(--dim);
    margin-top: 2px;
}

.entry:hover .meta {
    color: var(--mid);
}

.meta .hash {
    color: var(--dim);
}

.entry:hover .meta .hash {
    color: var(--soft);
}

.meta .tag {
    color: var(--mid);
}

.entry:hover .meta .tag {
    color: var(--accent);
}

.meta .ref {
    color: var(--hi);
}

.profile {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.content {
    min-width: 0;
}

.avatar {
    flex: none;
    width: 96px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.avatar-inner {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.avatar img {
    display: block;
    transform: scale(1.1);
    width: 100%;
    height: auto;
    border-radius: 4px;
    filter: saturate(.8) brightness(.95);
}

.entry:hover .avatar img {
    filter: saturate(.9) brightness(1);
}

.avatar-empty {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--dim);
    font-size: 2rem;
}

.expandable {
    cursor: pointer;
}

.toggle {
    margin-left: 10px;
    font-size: .75rem;
    color: var(--teal-dim);
    vertical-align: middle;
}

.expandable:hover .toggle,
.expandable.open .toggle {
    color: var(--teal);
}

.msg[role="button"]:focus-visible {
    outline: 1px dashed var(--teal-mid);
    outline-offset: 4px;
}

.desc {
    display: grid;
    grid-template-rows: 0fr;
}

.open .desc {
    grid-template-rows: 1fr;
}

.desc-inner {
    overflow: hidden;
    min-height: 0;
}

.desc-text {
    margin-top: 10px;
    padding: 2px 0 2px 14px;
    border-left: 1px solid var(--teal-dim);
    color: var(--soft);
    font-size: .9rem;
    max-width: 62ch;
}

.desc-text p {
    margin: 0 0 6px;
    white-space: pre-wrap;
}

.desc-text p:last-child {
    margin-bottom: 0;
}

.desc-links {
    margin-top: 8px;
}

.desc-text p + .desc-links {
    margin-top: 10px;
}

.desc-link {
    overflow-wrap: anywhere;
}

.desc-link-label {
    display: inline-block;
    min-width: 8ch;
    margin-right: 10px;
    color: var(--teal-mid);
}

.desc-link a {
    color: var(--teal-hi);
}

.body {
    margin-top: 12px;
    color: var(--soft);
}

.body-link {
    color: inherit;
    text-decoration: underline dotted var(--teal-dim);
    text-underline-offset: 3px;
}

.body-link:hover {
    color: var(--teal-hi);
    text-decoration-color: var(--teal-mid);
}

.body p {
    margin: 0;
    white-space: pre-wrap;
}

.body .note {
    color: var(--dim);
    font-size: .85rem;
}

.release {
    position: relative;
    padding: 4px 0 22px calc(var(--rail) + 18px);
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.release::before {
    left: 0;
    top: calc(4px + 1.05rem * 1.45);
}

.release .node {
    left: 0;
    top: 4px;
    font-size: 1.05rem;
    color: var(--accent);
}

.release-version {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.05rem;
    letter-spacing: .05em;
}

.release-label {
    color: var(--dim);
    font-size: .85rem;
}

.footer {
    max-width: 760px;
    margin: 24px 20px 40px calc(var(--inset) + 20px);
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    font-size: .8rem;
    color: var(--dim);
    display: grid;
    gap: 8px;
}

.footer-version {
    color: var(--soft);
}

.footer-version .v {
    color: var(--accent);
    font-weight: bold;
}

.footer-deps span {
    display: inline-block;
    margin: 0 6px 4px 0;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--mid);
}

.footer-remotes a {
    margin-right: 16px;
}

.footer-remotes .name {
    color: var(--dim);
    margin-right: 6px;
}

.cursor::after {
    content: '█';
    color: var(--rail-c);
    margin-left: 4px;
}

@media (hover: none) {
    .entry:hover {
        background-color: transparent;
    }
}

@media (max-width: 480px) {
    body {
        -webkit-tap-highlight-color: transparent;
    }

    .container {
        margin-left: 0;
        padding: 28px 24px 12px;
    }

    .branches {
        flex-wrap: wrap;
        gap: 6px 10px;
        margin: 0 0 22px;
        font-size: clamp(.62rem, 3vw, .82rem);
    }

    .branch {
        white-space: nowrap;
    }

    .branch-count {
        margin-left: 4px;
    }

    .branches-label {
        flex-basis: 100%;
        font-size: .75rem;
    }

    .branch-mark {
        width: 1.5ch;
    }

    .entry {
        padding: 8px 0 28px calc(var(--rail) + 16px);
    }

    .release {
        padding-left: calc(var(--rail) + 4px);
        padding-bottom: 26px;
    }

    .node {
        font-size: 1rem;
    }

    .entry::before {
        top: calc(6px + 1rem * 1.45);
    }

    .msg {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .type {
        display: table;
        margin: 0 0 6px;
        font-size: .65rem;
    }

    .meta {
        font-size: .72rem;
        line-height: 1.5;
        margin-top: 4px;
    }

    .profile {
        display: grid;
        grid-template-columns: 64px 1fr;
        gap: 0 14px;
        align-items: center;
    }

    .profile > .content {
        display: contents;
    }

    .profile .avatar {
        width: 64px;
    }

    .profile .body {
        grid-column: 1 / -1;
        margin-top: 0;
        padding-top: 12px;
    }

    .body {
        margin-top: 10px;
        font-size: .92rem;
        line-height: 1.65;
    }

    .desc-text {
        margin-top: 14px;
        padding-left: 12px;
        font-size: .88rem;
        line-height: 1.65;
    }

    .desc-text p {
        margin-bottom: 10px;
    }

    .desc-link-label {
        min-width: 0;
    }

    .footer {
        margin: 16px 24px 28px;
    }

    .footer-remotes {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}
