.legal-page {
    min-width: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 92% 4%, rgba(114, 195, 32, 0.12), transparent 25rem),
        var(--paper);
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #fff;
    background: #101512;
    box-shadow: 0 1px 12px rgba(16, 21, 18, 0.18);
}

.legal-header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.legal-header .brand {
    color: #fff;
}

.legal-header-actions,
.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 20px;
}

.legal-header-actions a,
.legal-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.legal-header-actions a:first-child {
    color: #a8df72;
}

.legal-main {
    padding-block: clamp(38px, 7vw, 82px);
}

.legal-layout {
    width: min(calc(100% - 2 * var(--page-gutter)), 75rem);
    display: grid;
    grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 68px);
    align-items: start;
}

.legal-layout[hidden] {
    display: none;
}

.legal-intro {
    grid-column: 1 / -1;
    max-width: 52rem;
}

.legal-kicker {
    margin-bottom: 10px;
    color: var(--green-deep);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legal-intro h1 {
    max-width: 14ch;
    margin-bottom: 14px;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.legal-updated {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.legal-language-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.legal-language-switcher button {
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid rgba(35, 112, 16, 0.35);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.legal-language-switcher button[aria-pressed="true"] {
    color: #fff;
    border-color: var(--green-deep);
    background: var(--green-deep);
}

.legal-status {
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(35, 112, 16, 0.2);
    border-left: 5px solid var(--green);
    border-radius: 10px;
    background: #f2f7ef;
}

.legal-status p:last-child {
    margin-bottom: 0;
}

.legal-review {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid #d8a72b;
    border-left: 5px solid #d8a72b;
    border-radius: 10px;
    background: #fff8e6;
}

.legal-review strong {
    display: block;
    margin-bottom: 5px;
}

.legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 20px;
    border: 1px solid rgba(35, 112, 16, 0.18);
    border-radius: 14px;
    background: #fff;
}

.legal-toc h2 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.legal-toc ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legal-toc a {
    display: block;
    padding-block: 3px;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content {
    min-width: 0;
}

.legal-content[hidden] {
    display: none;
}

.legal-content section {
    padding-block: 4px 34px;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.legal-content section + section {
    padding-top: 30px;
    border-top: 1px solid rgba(20, 25, 19, 0.12);
}

.legal-content h2 {
    margin-bottom: 12px;
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.2;
}

.legal-content h3 {
    margin: 22px 0 8px;
    font-size: 1.05rem;
}

.legal-content p,
.legal-content li {
    color: #2f3832;
    line-height: 1.75;
}

.legal-content ul {
    padding-left: 1.25rem;
}

.legal-content a {
    color: var(--green-deep);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.legal-pending {
    padding: 16px 18px;
    border-radius: 10px;
    background: #eef3eb;
    box-shadow: inset 4px 0 var(--green);
}

.legal-footer {
    border-top: 1px solid rgba(20, 25, 19, 0.13);
    background: #f2f5f0;
}

.legal-footer-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 0.78rem;
}

.legal-footer-inner p {
    margin: 0;
}

.legal-page :focus-visible {
    outline: 3px solid var(--green-bright);
    outline-offset: 4px;
    border-radius: 3px;
}

@media (max-width: 760px) {
    .legal-header-inner,
    .legal-footer-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 12px;
    }

    .legal-header-actions,
    .legal-footer-links {
        justify-content: flex-start;
    }

    .legal-header-actions a {
        min-height: 36px;
    }

    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-toc {
        position: static;
    }

    .legal-intro h1 {
        max-width: none;
    }

    .legal-content section {
        scroll-margin-top: 13rem;
    }
}

@media print {
    .legal-header-actions,
    .legal-toc,
    .legal-footer-links {
        display: none;
    }

    .legal-header {
        position: static;
        color: #000;
        background: #fff;
        box-shadow: none;
    }

    .legal-layout {
        display: block;
    }
}
