:root {
    --legal-bg: #070b08;
    --legal-panel: #0d1410;
    --legal-panel-soft: #111a14;
    --legal-text: #eef4f0;
    --legal-muted: #a8b5ad;
    --legal-border: #223029;
    --legal-accent: #4ade80;
    --legal-accent-strong: #22c55e;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    background: var(--legal-bg);
    color: var(--legal-text);
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.legal-site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    padding: 14px max(20px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--legal-border);
    background: rgba(7, 11, 8, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.legal-site-header-inner {
    width: min(1160px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.legal-brand,
.legal-header-actions {
    display: inline-flex;
    align-items: center;
}

.legal-brand img {
    display: block;
    width: auto;
    height: 34px;
}

.legal-header-actions {
    gap: 18px;
}

.legal-header-actions a {
    color: var(--legal-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.legal-header-actions a:hover,
.legal-header-actions a:focus-visible {
    color: var(--legal-text);
}

.legal-header-actions .legal-header-cta {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--legal-accent);
    color: #071109;
}

.legal-header-actions .legal-header-cta:hover,
.legal-header-actions .legal-header-cta:focus-visible {
    background: #75e99c;
    color: #071109;
}

.container {
    width: min(1160px, 100%);
    padding: 48px 20px 72px;
    gap: 48px;
}

.sidebar {
    width: 260px;
    top: 104px;
    height: calc(100dvh - 128px);
}

.sidebar h3 {
    color: #7f9085;
}

.sidebar a {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--legal-muted);
    line-height: 1.35;
}

.sidebar a:hover,
.sidebar a:focus-visible {
    color: var(--legal-text);
    background: var(--legal-panel-soft);
    outline: none;
}

.sidebar a.active {
    color: var(--legal-accent);
    background: rgba(74, 222, 128, 0.09);
}

.content {
    max-width: 820px;
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    background: var(--legal-panel);
    box-shadow: 0 24px 80px rgba(2, 8, 4, 0.28);
}

.meta-info {
    color: #829087;
}

h1,
h2,
h3,
strong {
    color: var(--legal-text);
}

h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.08;
}

h2 {
    border-bottom-color: var(--legal-border);
    line-height: 1.25;
}

p,
ul,
ol,
li {
    color: var(--legal-muted);
}

p {
    max-width: 76ch;
    text-align: left;
}

a {
    color: var(--legal-accent);
    text-underline-offset: 3px;
}

.intro-note,
.notice,
.warning {
    border: 1px solid rgba(74, 222, 128, 0.22);
    border-radius: 12px;
    background: rgba(74, 222, 128, 0.07);
    color: var(--legal-muted);
}

.legal-footer {
    border-top-color: var(--legal-border);
    color: #829087;
}

:focus-visible {
    outline: 2px solid var(--legal-accent);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .legal-site-header {
        padding: 12px 16px;
    }

    .legal-site-header-inner {
        gap: 14px;
    }

    .legal-brand img {
        height: 28px;
    }

    .legal-header-actions a:first-child {
        display: none;
    }

    .legal-header-actions .legal-header-cta {
        min-height: 42px;
        padding: 10px 13px;
        font-size: 0.82rem;
    }

    .container {
        flex-direction: column;
        padding: 24px 16px 48px;
        gap: 20px;
    }

    .sidebar {
        display: block;
        position: static;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .sidebar h3 {
        margin-bottom: 10px;
    }

    .sidebar ul {
        display: flex;
        gap: 8px;
        margin: 0;
        padding: 0 0 8px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .sidebar li {
        flex: 0 0 auto;
        margin: 0;
        scroll-snap-align: start;
    }

    .sidebar a {
        min-height: 44px;
        padding: 12px 14px;
        border: 1px solid var(--legal-border);
        white-space: nowrap;
    }

    .content {
        width: 100%;
        padding: 26px 20px;
    }

    h1 {
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
