:root {
    color-scheme: light;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --accent: #2563eb;
    --bg: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.legal-header {
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.legal-header-inner,
.legal-main {
    width: min(100%, 48rem);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.legal-header-inner {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.legal-lang {
    display: inline-flex;
    gap: .5rem;
    font-size: .875rem;
    font-weight: 600;
}

.legal-lang a {
    color: var(--muted);
    text-decoration: none;
    padding: .25rem .5rem;
    border-radius: .375rem;
}

.legal-lang a.is-active {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
}

.legal-page-title {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.legal-section + .legal-section {
    margin-top: 1.5rem;
}

.legal-section-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    line-height: 1.3;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -.02em;
}

.legal-brand img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.legal-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.legal-document {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.legal-document h1,
.legal-document h2,
.legal-document h3 {
    line-height: 1.25;
    margin: 1.5rem 0 .75rem;
}

.legal-document h1 {
    margin-top: 0;
    font-size: 2rem;
}

.legal-document h2 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
}

.legal-document hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.legal-document p:last-child,
.legal-document ul:last-child,
.legal-document ol:last-child {
    margin-bottom: 0;
}

.legal-document li:last-child {
    margin-bottom: 0;
}

.legal-document p,
.legal-document ul,
.legal-document ol {
    margin: 0 0 1rem;
}

.legal-document ul,
.legal-document ol {
    padding-inline-start: 1.25rem;
}

.legal-document li {
    margin-bottom: .35rem;
}

.legal-document a {
    color: var(--accent);
}

.legal-updated {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: .875rem;
    text-align: center;
}

.support-intro {
    margin: 0 0 1.5rem;
    color: var(--muted);
}

.support-alert {
    margin: 0 0 1.25rem;
    padding: .875rem 1rem;
    border-radius: .75rem;
    font-size: .9375rem;
}

.support-alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.support-alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.support-form {
    display: grid;
    gap: 1rem;
}

.support-field {
    display: grid;
    gap: .375rem;
}

.support-field label {
    font-size: .875rem;
    font-weight: 600;
}

.support-optional {
    font-weight: 400;
    color: var(--muted);
}

.support-field input,
.support-field textarea {
    width: 100%;
    padding: .75rem .875rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.support-field input:focus,
.support-field textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

.support-field textarea {
    resize: vertical;
    min-height: 8rem;
}

.support-submit {
    justify-self: start;
    margin-top: .25rem;
    padding: .75rem 1.25rem;
    border: 0;
    border-radius: .75rem;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.support-submit:hover {
    filter: brightness(1.05);
}

.support-footer-note {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: .875rem;
}

.support-footer-note a {
    color: var(--accent);
}

@media (min-width: 640px) {
    .legal-document {
        padding: 2.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --text: #e2e8f0;
        --muted: #94a3b8;
        --border: #334155;
        --surface: #0f172a;
        --accent: #60a5fa;
        --bg: #020617;
    }

    .legal-header {
        background: rgba(2, 6, 23, 0.92);
    }

    .support-alert-success {
        color: #86efac;
    }

    .support-alert-error {
        color: #fca5a5;
    }
}
