:root {
    color-scheme: dark;
    --page: #0b1628;
    --panel: #182b45;
    --panel-2: #213a5c;
    --text: #f4f8ff;
    --muted: #aec2df;
    --accent: #61a9ff;
    --line: rgba(164, 197, 235, 0.22);
}

html[data-theme="light"] {
    color-scheme: light;
    --page: #d7e0e8;
    --panel: #e5ebf0;
    --panel-2: #d9e2ea;
    --text: #172538;
    --muted: #5d7186;
    --accent: #2369aa;
    --line: rgba(71, 91, 111, .24);
}

html[data-theme="light"] a { color:#1f609d; }
html[data-theme="light"] .legal-document {
    box-shadow:0 14px 36px rgba(45,62,79,.12);
}
html[data-theme="light"] .legal-button {
    background:#dce5ec;
    color:#173f66;
    border-color:#9eb3c6;
}
html[data-theme="light"] .legal-button:hover { background:#cfdae4; }
html[data-theme="light"] .auth-public-description { color:var(--muted); }

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}
a { color: #8ec2ff; }
.legal-site-header, .legal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 980px;
    margin: 0 auto;
    padding: 1.2rem 1.5rem;
}
.legal-site-header { border-bottom: 1px solid var(--line); }
.legal-brand { color: var(--text); font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.legal-site-header nav, .auth-legal-links, .menu-legal-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.legal-site-header nav a { text-decoration: none; }
.legal-document {
    max-width: 860px;
    margin: 2rem auto;
    padding: clamp(1.4rem, 4vw, 3.5rem);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.legal-kicker { color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1.05; margin: .3rem 0 .7rem; }
h2 { margin-top: 2.2rem; font-size: 1.45rem; }
h3 { margin-top: 1.4rem; font-size: 1.1rem; }
.legal-effective, .legal-footer { color: var(--muted); }
li + li { margin-top: .55rem; }
.legal-callout { background: var(--panel-2); border-left: 4px solid var(--accent); padding: 1rem 1.25rem; border-radius: 12px; }
.legal-callout h2 { margin-top: 0; }
.legal-button { display: inline-block; padding: .8rem 1.1rem; border: 1px solid var(--accent); border-radius: 10px; text-decoration: none; font-weight: 750; }
.legal-footer { border-top: 1px solid var(--line); }
.auth-public-description { color: #aec2df; font-size: .88rem; line-height: 1.45; margin-top: 1.4rem; }
.auth-legal-links { justify-content: center; font-size: .86rem; }
.menu-legal-links { justify-content: center; padding: .8rem 1rem; font-size: .8em; }
.menu-legal-links a { width: auto !important; min-height: 0 !important; padding: .35rem !important; }
@media (max-width: 640px) {
    .legal-site-header, .legal-footer { align-items: flex-start; flex-direction: column; }
    .legal-document { margin: .75rem; border-radius: 18px; }
}
