#purecomments-mount {
    min-height: 400px;
}

#comments {
    margin-block-start: 2em;
    color: var(--color-white);
    font-family: inherit;
}

#comments .comments-header {
    margin-block-end: 1em;
}

#comments .comments-header h2 {
    margin: 0;
}

#comments .comments-header h2::after {
    content: "beta";
    display: inline-block;
    margin-inline-start: 0.4em;
    color: oklch(from var(--color-red) l c h / 0.7);
    background-color: oklch(from var(--color-red) l c h / 0.2);
    font-family: sans-serif;
    padding-inline: 0.25em;
    border-radius: 0.2em;
    font-size: 0.5em;
    vertical-align: top;
    text-transform: lowercase;
}

#comments .comments-content > p {
    color: var(--color-gray);
}

#comments .comments-thread {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-block-end: 2em;
}

#comments .comment-item {
    background: none;
    border: none;
    padding: 0;
    margin-block-end: 1em;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5em;
    row-gap: 0.25em;
}

#comments .comment-header {
    display: contents;
}

#comments .comment-meta {
    order: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5em;
}

#comments .comment-header time {
    order: 1;
}

#comments .comment-actions {
    order: 2;
    margin: 0;
}

#comments .comment-body {
    order: 3;
    flex-basis: 100%;
    min-width: 0;
}

#comments .comment-children {
    order: 4;
    flex-basis: 100%;
    min-width: 0;
}

#comments .comment-meta strong {
    font-weight: 600;
}

#comments .comment-header time {
    color: var(--color-gray);
    font-size: 0.85em;
}

#comments .comment-badge {
    background: oklch(from var(--color-darkgreen) calc(l + 0.05) c h);
    color: var(--color-gray);
    text-transform: lowercase;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border: none;
    border-radius: 0.2em;
}

#comments .comment-body {
    margin-block-start: 0.25em;
}

#comments .comment-body p {
    margin-block-start: 0;
    margin-block-end: 1em;
}

#comments .comment-body p:last-child {
    margin-block-end: 0;
}

#comments .comment-body a {
    color: var(--color-yellow);
    text-decoration-color: var(--shade-link-yellow);
}

#comments .comment-body a:hover {
    text-decoration-color: var(--color-yellow);
}

#comments .comment-body blockquote {
    font-size: inherit;
}

#comments .comment-actions {
    display: flex;
    gap: 0.5em;
    align-items: baseline;
    justify-content: flex-start;
}

#comments .comment-actions button {
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
    font-weight: 600;
    font-family: inherit;
    color: var(--color-gray);
    text-underline-offset: 0.4em;
    text-decoration-thickness: 1px;
    text-decoration-skip-ink: none;
    text-decoration-color: oklch(from var(--color-white) calc(l - 0.45) c h);

    &:hover,
    &.no-decoration:hover {
        text-decoration: underline;
        text-decoration-color: var(--color-white);
    }

    &:focus-visible,
    &:active {
        outline: 2px solid var(--color-yellow);
        outline-offset: 2px;
        border-radius: 2px;
    }
}

#comments .comment-children {
    margin-top: 1em;
    margin-inline-start: 1.25em;
    padding-left: 0;
    border-left: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
    position: relative;
}

#comments .comment-children::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    top: -1em;
    height: 1.5em;
    width: 1px;
    background: var(--shade-muted);
}

#comments .comment-children > .comment-item {
    position: relative;
    padding-inline-start: 1.25em;
}

#comments .comment-children > .comment-item::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    width: 0.75em;
    height: 1em;
    border-inline-start: 1px solid var(--shade-muted);
    border-block-end: 1px solid var(--shade-muted);
    border-end-start-radius: 0.75em;
}

#comments .comment-children > .comment-item:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    top: 0;
    bottom: -2.5em;
    width: 1px;
    background: var(--shade-muted);
}

#comments .button.load {
    display: block;
    margin: 1.5em auto;
    background: none;
    border: 1px solid var(--shade-hairline);
    color: var(--color-white);
    padding: 0.5em 1em;
    font: inherit;
    cursor: pointer;
    border-radius: 0.25em;
}

#comments .button.load:hover {
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

#comments .replying-to {
    font-size: 0.9em;
    padding: 0.5em 0.75em;
    border: 1px solid var(--shade-hairline);
    border-radius: 0.25em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    margin-block-end: 1em;
}

#comments .replying-to.hidden {
    display: none;
}

#comments .replying-to button {
    background: none;
    border: none;
    color: var(--color-gray);
    font: inherit;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

#comments .replying-to button:hover {
    color: var(--color-yellow);
}

#comments form {
    background: none;
    border: 1px solid var(--shade-hairline);
    padding: 1em 0.75em;
    border-radius: 0.25em;
}

#comments form h3 {
    margin: 0 0 0.5em;
    font-size: 1em;
}

#comments form label {
    display: block;
    color: var(--color-gray);
    font-size: 0.95em;
}

#comments form input,
#comments form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.25em;
    margin-bottom: 0.75em;
    padding: 0.4em 0.5em;
    font: inherit;
    color: var(--color-white);
    background: oklch(from var(--color-darkgreen) calc(l + 0.03) c h);
    border: 1px solid var(--shade-hairline);
    border-radius: 0.25em;
}

#comments form input:focus,
#comments form textarea:focus {
    outline: 2px solid var(--color-yellow);
    outline-offset: 1px;
    border-color: transparent;
}

#comments form button[type="submit"],
#comments form .button {
    display: inline-block;
    margin: 0;
    padding: 0.35em 0.75em;
    background: var(--color-yellow);
    color: var(--color-darkgreen);
    border: 1px solid var(--color-yellow);
    border-radius: 0.25em;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

#comments form button[type="submit"]:hover,
#comments form .button:hover {
    background: oklch(from var(--color-yellow) calc(l - 0.05) c h);
    border-color: oklch(from var(--color-yellow) calc(l - 0.05) c h);
}

#comments .form-status {
    display: flex;
    justify-content: center;
    min-height: 0;
    margin: 1em;
    padding: 0;
}

#comments .form-status:not(:empty) {
    padding: 0.5em 0;
}

#comments .form-status.error {
    color: var(--color-red);
}

#comments .hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

#comments .comment-privacy-link {
    font-size: 0.8em;
    color: var(--color-gray);
    margin: 1em 0;
}

#comments .comment-privacy-link a {
    color: var(--color-gray);
}

.comment-privacy-link {
    display: none;
}

.comments-policy {
    margin-top: 1em;
    line-height: 120%;
    color: var(--color-gray);
}
