.page-container:has(.web-legal-document) {
    width: min(860px, calc(100% - 32px));
}

.web-legal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--theme-line, #dce5df);
}

.web-legal-header p {
    margin-bottom: 0;
    color: var(--theme-muted, #4f695b);
    font-size: .9rem;
}

.web-legal-back,
.web-legal-content a {
    color: var(--theme-accent, #17613f);
    text-underline-offset: .2em;
}

.web-legal-download {
    padding: 10px 16px;
    border-radius: 10px;
    background: #123d2b;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

[data-theme="dark"] .web-legal-download {
    background: #c9ed7a;
    color: #123d2b;
}

.web-legal-content {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.web-legal-content :is(h1, h2, h3) {
    line-height: 1.25;
}

.web-legal-content img {
    max-width: 100%;
    height: auto;
}

.web-legal-content pre {
    overflow-x: auto;
}

.web-legal-download[aria-disabled="true"] {
    opacity: .72;
    cursor: wait;
}

.web-legal-header .web-legal-download-error {
    flex-basis: 100%;
    color: #991b1b;
}

[data-theme="dark"] .web-legal-header .web-legal-download-error {
    color: #ffd9d5;
}
