body {
    background: #f7faf8;
}

.legal-page {
    min-height: 100vh;
}

.legal-page-nav,
.legal-page-header,
.legal-page-content,
.legal-page-footer {
    width: min(920px, calc(100% - 32px));
    margin-inline: auto;
}

.legal-page-nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.legal-back-link {
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.legal-back-link span {
    margin-right: 5px;
    font-size: 22px;
    vertical-align: -2px;
}

.legal-page-header {
    border-bottom: 1px solid var(--line);
    padding: 54px 0 32px;
}

.legal-page-header > p {
    margin: 0 0 9px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.legal-page-header h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.05;
}

.legal-page-header > span {
    display: block;
    max-width: 650px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.legal-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 34px;
    margin: 30px 0 0;
}

.legal-page-meta div {
    min-width: 140px;
}

.legal-page-meta dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.legal-page-meta dd {
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.legal-page-meta a {
    color: var(--green-dark);
}

.legal-page-sections {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    padding-inline: 16px;
    backdrop-filter: blur(12px);
    scrollbar-width: none;
}

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

.legal-page-sections::-webkit-scrollbar {
    display: none;
}

.legal-page-sections button {
    min-height: 50px;
    flex: 0 0 auto;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 0 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.legal-page-sections button:hover,
.legal-page-sections button:focus-visible {
    border-bottom-color: var(--green);
    color: var(--green-dark);
    outline: 0;
}

.legal-page-content {
    min-height: 420px;
    padding: 36px 0 72px;
}

.legal-page-content .legal-content {
    max-width: 780px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.72;
}

.legal-page-content .legal-content p {
    margin: 0;
}

.legal-page-content .legal-intro {
    border-left: 3px solid var(--green);
    background: var(--soft);
    color: var(--ink);
    padding: 18px 20px;
    font-weight: 700;
}

.legal-page-content .legal-content section {
    scroll-margin-top: 68px;
    border-top: 1px solid var(--line);
    margin-top: 30px;
    padding-top: 28px;
}

.legal-page-content .legal-content section p + p {
    margin-top: 13px;
}

.legal-page-content .legal-content h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 15px;
    color: var(--ink);
    font-size: 19px;
}

.legal-page-content .legal-content h3 span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #e8f7ef;
    color: var(--green-dark);
    font-size: 12px;
}

.legal-page-content .legal-content a {
    color: var(--green-dark);
    text-decoration: underline;
}

.legal-page-state {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    text-align: center;
}

.legal-page-state strong {
    color: var(--ink);
}

.legal-page-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--line);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: legal-spin 700ms linear infinite;
}

.legal-page-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 24px 0 36px;
    font-size: 14px;
    font-weight: 700;
}

.legal-page-footer a {
    color: var(--green-dark);
}

@keyframes legal-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .legal-page-nav {
        min-height: 66px;
    }

    .legal-page-nav .brand img {
        width: 132px;
    }

    .legal-page-header {
        padding-top: 34px;
    }

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

    .legal-page-meta {
        display: block;
    }

    .legal-page-meta div + div {
        margin-top: 14px;
    }

    .legal-page-sections {
        justify-content: flex-start;
    }

    .legal-page-content {
        padding-top: 24px;
    }

    .legal-page-content .legal-content {
        font-size: 15px;
    }

    .legal-page-footer {
        flex-direction: column;
    }
}
