/*
 * Shared styling for /privacy, /terms and /data-deletion.
 *
 * Long-form reading, not marketing: generous measure, high contrast, and no
 * animation. Palette matches the site canvas (#050510) and its indigo/violet
 * range. No inline <style> or <script> anywhere in these pages — the global CSP
 * pins inline script hashes, and a legal page has no reason to need one.
 */

:root {
    --legal-bg: #050510;
    --legal-ink: #e9e9f2;
    --legal-muted: #a3a3b8;
    --legal-accent: #a78bfa;
    --legal-accent-dim: #818cf8;
    --legal-rule: rgba(167, 139, 250, 0.18);
    --legal-panel: rgba(129, 140, 248, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--legal-bg);
    color: var(--legal-ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.legal-wrap {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
}

.legal-back {
    display: inline-block;
    color: var(--legal-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 2.5rem;
}

.legal-back:hover,
.legal-back:focus-visible {
    color: var(--legal-accent);
}

h1 {
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

.legal-meta {
    color: var(--legal-muted);
    font-size: 0.92rem;
    margin: 0 0 2.5rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--legal-rule);
}

.legal-meta strong {
    color: var(--legal-ink);
    font-weight: 600;
}

h2 {
    font-size: 1.22rem;
    letter-spacing: -0.01em;
    margin: 2.75rem 0 0.75rem;
    color: #fff;
}

h3 {
    font-size: 1.02rem;
    margin: 1.75rem 0 0.5rem;
    color: var(--legal-accent);
}

p, li {
    color: var(--legal-ink);
}

p {
    margin: 0 0 1rem;
}

ul {
    margin: 0 0 1rem;
    padding-left: 1.15rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--legal-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
    color: #fff;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    color: var(--legal-accent);
    background: var(--legal-panel);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    /* Long addresses and keys must not push the page sideways on a phone. */
    overflow-wrap: anywhere;
}

/* Callout for the things people most need to actually notice. */
.legal-note {
    background: var(--legal-panel);
    border-left: 2px solid var(--legal-accent-dim);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.15rem;
    margin: 1.5rem 0;
}

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

/* Wide content scrolls inside itself rather than the page. */
.legal-table-scroll {
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 32rem;
    font-size: 0.94rem;
}

th, td {
    text-align: left;
    padding: 0.65rem 0.85rem 0.65rem 0;
    border-bottom: 1px solid var(--legal-rule);
    vertical-align: top;
}

th {
    color: var(--legal-muted);
    font-weight: 600;
    white-space: nowrap;
}

.legal-footer {
    margin-top: 3.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--legal-rule);
    color: var(--legal-muted);
    font-size: 0.9rem;
}

.legal-footer a {
    color: var(--legal-muted);
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
    color: var(--legal-accent);
}

.legal-footer-sep {
    opacity: 0.4;
    margin: 0 0.4rem;
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .legal-wrap {
        padding: 2.5rem 1.15rem 4rem;
    }

    h2 {
        margin-top: 2.25rem;
    }
}

/* The pages are static, but respect the preference regardless. */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
