:root {
    --hljh-legal-ink: #17212b;
    --hljh-legal-muted: #68737d;
    --hljh-legal-line: #e2e7ea;
    --hljh-legal-accent: #087b5a;
    --hljh-legal-accent-dark: #056348;
    --hljh-legal-soft: #eef8f4;
}

html.hljh-legal-open,
html.hljh-legal-open body {
    overflow: hidden !important;
}

.hljh-signin-agreement {
    color: var(--muted-2-color, #7d8790);
    font-size: 12px;
    line-height: 1.7;
    margin-top: 12px;
    padding: 0 12px;
    text-align: center;
}

.hljh-signin-agreement a,
.hljh-legal-link {
    cursor: pointer;
    margin: 0 3px;
    text-underline-offset: 3px;
}

.hljh-legal-modal[hidden] {
    display: none !important;
}

.hljh-legal-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 100000;
}

.hljh-legal-backdrop {
    background: rgba(16, 24, 32, .66);
    border: 0;
    cursor: default;
    inset: 0;
    padding: 0;
    position: absolute;
    width: 100%;
}

.hljh-legal-dialog {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    color: var(--hljh-legal-ink);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: min(86vh, 920px);
    max-width: 900px;
    overflow: hidden;
    position: relative;
    width: min(100%, 900px);
}

.hljh-legal-dialog-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--hljh-legal-line);
    display: flex;
    justify-content: space-between;
    min-height: 76px;
    padding: 14px 20px 14px 24px;
}

.hljh-legal-dialog-heading {
    align-items: center;
    display: flex;
    gap: 13px;
    min-width: 0;
}

.hljh-legal-dialog-icon {
    align-items: center;
    background: var(--hljh-legal-soft);
    border-radius: 8px;
    color: var(--hljh-legal-accent);
    display: flex;
    flex: 0 0 42px;
    font-size: 18px;
    height: 42px;
    justify-content: center;
}

.hljh-legal-dialog-label {
    color: var(--hljh-legal-accent);
    display: block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.hljh-legal-dialog-header h2 {
    color: var(--hljh-legal-ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.35;
    margin: 2px 0 0;
}

.hljh-legal-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #68737d;
    display: flex;
    flex: 0 0 40px;
    font-size: 18px;
    height: 40px;
    justify-content: center;
    padding: 0;
}

.hljh-legal-close:hover,
.hljh-legal-close:focus-visible {
    background: #f0f3f5;
    color: #17212b;
    outline: none;
}

.hljh-legal-dialog-body {
    background: #f7f9fa;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 26px 34px 38px;
    scroll-behavior: smooth;
}

.hljh-legal-dialog-body:focus {
    outline: none;
}

.hljh-legal-dialog-body .hljh-legal-page-header {
    display: none;
}

.hljh-legal-dialog-body .hljh-legal-sections h2:first-child {
    margin-top: 2px;
}

.hljh-legal-dialog-footer {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--hljh-legal-line);
    color: var(--hljh-legal-muted);
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    min-height: 68px;
    padding: 12px 20px 12px 24px;
}

.hljh-legal-confirm {
    align-items: center;
    background: var(--hljh-legal-accent);
    border: 0;
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    gap: 7px;
    min-height: 40px;
    padding: 0 18px;
}

.hljh-legal-confirm:hover,
.hljh-legal-confirm:focus-visible {
    background: var(--hljh-legal-accent-dark);
    color: #fff;
    outline: 3px solid rgba(8, 123, 90, .18);
}

.hljh-legal-loading,
.hljh-legal-error {
    align-items: center;
    color: var(--hljh-legal-muted);
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    min-height: 360px;
    text-align: center;
}

.hljh-legal-loading .fa,
.hljh-legal-error .fa {
    color: var(--hljh-legal-accent);
    font-size: 25px;
}

.hljh-legal-article {
    color: var(--hljh-legal-ink);
    font-size: 15px;
    line-height: 1.9;
    margin: 0 auto;
    max-width: 800px;
}

.hljh-legal-page-header {
    background: #fff;
    border: 1px solid var(--hljh-legal-line);
    border-left: 4px solid var(--hljh-legal-accent);
    border-radius: 6px;
    margin-bottom: 24px;
    padding: 24px 26px;
}

.hljh-legal-kicker {
    color: var(--hljh-legal-accent);
    font-size: 12px;
    font-weight: 700;
}

.hljh-legal-page-header h1 {
    color: var(--hljh-legal-ink);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.35;
    margin: 6px 0 12px;
}

.hljh-legal-meta {
    color: var(--hljh-legal-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px 20px;
}

.hljh-legal-intro {
    border-top: 1px solid var(--hljh-legal-line);
    color: #4c5963;
    margin: 17px 0 0 !important;
    padding-top: 15px;
}

.hljh-legal-sections h2 {
    color: var(--hljh-legal-ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.5;
    margin: 32px 0 12px;
    padding-left: 13px;
    position: relative;
}

.hljh-legal-sections h2::before {
    background: var(--hljh-legal-accent);
    border-radius: 2px;
    content: '';
    height: 18px;
    left: 0;
    position: absolute;
    top: 5px;
    width: 4px;
}

.hljh-legal-sections p {
    color: #33414c;
    margin: 0 0 12px;
    text-align: justify;
}

.hljh-legal-page-footer {
    border-top: 1px solid var(--hljh-legal-line);
    color: var(--hljh-legal-muted);
    font-size: 13px;
    margin-top: 34px;
    padding-top: 18px;
}

body.hljh-legal-page .article-content,
body.hljh-legal-page .wp-posts-content {
    overflow: visible;
}

body.hljh-legal-page .hljh-legal-article {
    padding: 12px 0 30px;
}

@media (max-width: 700px) {
    .hljh-legal-modal {
        align-items: flex-end;
        padding: 0;
    }

    .hljh-legal-dialog {
        border: 0;
        border-radius: 8px 8px 0 0;
        height: 92dvh;
        max-width: none;
        width: 100%;
    }

    .hljh-legal-dialog-header {
        min-height: 68px;
        padding: 11px 12px 11px 16px;
    }

    .hljh-legal-dialog-icon {
        flex-basis: 38px;
        height: 38px;
    }

    .hljh-legal-dialog-header h2 {
        font-size: 17px;
    }

    .hljh-legal-dialog-body {
        padding: 18px 16px 30px;
    }

    .hljh-legal-dialog-footer {
        min-height: 64px;
        padding: 10px 12px 10px 16px;
    }

    .hljh-legal-confirm {
        padding: 0 14px;
    }

    .hljh-legal-page-header {
        padding: 20px 18px;
    }

    .hljh-legal-page-header h1 {
        font-size: 23px;
    }

    .hljh-legal-article {
        font-size: 14px;
        line-height: 1.85;
    }

    .hljh-legal-sections h2 {
        font-size: 18px;
        margin-top: 27px;
    }
}
