:root {
    --primary: #2f74ff;
    --accent: #a855f7;
    --accent-2: #ec4899;

    --bg: #eef2f9;
    --bg-2: #e3e9f5;
    --text: #0b1020;
    --text-2: #51607a;
    --text-3: #8a97ad;

    --glass: rgba(255, 255, 255, 0.55);
    --glass-strong: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-border-2: rgba(15, 23, 42, 0.08);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    --glass-blur: blur(28px) saturate(180%);

    --shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
    --grad-primary: linear-gradient(135deg, #2f74ff 0%, #6366f1 50%, #a855f7 100%);
}
.dark {
    --bg: #060912;
    --bg-2: #0a0f1f;
    --text: #f2f5fb;
    --text-2: #9aa6bd;
    --text-3: #5d6b86;

    --glass: rgba(255, 255, 255, 0.055);
    --glass-strong: rgba(22, 29, 51, 0.62);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-2: rgba(255, 255, 255, 0.08);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.04);

    --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s, color 0.4s;
    min-height: 100vh;
    display: flex; flex-direction: column;
    position: relative;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* Ambient background */
.ambient {
    position: fixed; inset: 0; z-index: -2; overflow: hidden;
    pointer-events: none; background: var(--bg);
}
.ambient .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.dark .ambient .blob { opacity: 0.38; }
.ambient .b1 {
    width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
    background: radial-gradient(circle, #2f74ff 0%, transparent 70%);
    top: -10%; left: -10%;
}
.ambient .b2 {
    width: 46vw; height: 46vw; max-width: 600px; max-height: 600px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    bottom: -12%; right: -10%;
}

/* Header — floating glass bar */
.header {
    position: sticky; top: 0.75rem;
    z-index: 50;
    margin: 0.75rem auto 0;
    max-width: 1180px;
    padding: 0 1.5rem;
}
.nav {
    display: flex; justify-content: space-between; align-items: center;
    height: 3.5rem;
    padding: 0 0.5rem 0 1.25rem;
    border-radius: 9999px;
    background: var(--glass-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight), 0 8px 24px -12px rgba(15, 23, 42, 0.18);
}
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: -0.02em; }
.logo span { color: var(--text); }

.icon-btn {
    display: grid; place-items: center;
    width: 2.4rem; height: 2.4rem;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-2);
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: var(--glass-highlight);
    transition: color 0.2s, transform 0.2s;
}
.icon-btn:hover { color: var(--text); transform: translateY(-1px); }

/* Page */
main { flex: 1; padding: 4rem 0 5rem; }

.legal-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: var(--glass-highlight), var(--shadow);
    padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
}

.legal h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: var(--grad-primary);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.legal .lead {
    color: var(--text-2);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.legal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border-2);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.legal h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal p { margin-bottom: 1rem; color: var(--text-2); }
.legal strong { color: var(--text); }
.legal ul { margin: 0 0 1rem 1.25rem; color: var(--text-2); }
.legal li { margin-bottom: 0.4rem; }

.placeholder {
    display: inline-block;
    padding: 0.1em 0.5em;
    background: rgba(236,72,153,0.12);
    color: var(--accent-2);
    border: 1px dashed rgba(236,72,153,0.4);
    border-radius: 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88em;
    font-weight: 600;
}

.notice {
    padding: 1rem 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--primary);
    border-radius: 0.875rem;
    box-shadow: var(--glass-highlight);
    margin: 1.5rem 0;
    font-size: 0.93rem;
    color: var(--text-2);
}

.back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
    font-size: 0.875rem;
    color: var(--text-2);
    font-weight: 500;
    transition: color 0.2s, transform 0.2s;
}
.back-link:hover { color: var(--primary); text-decoration: none; transform: translateY(-1px); }

/* Footer */
footer {
    padding: 2.5rem 0 3rem;
    text-align: center;
}
.footer-inner {
    padding: 2rem 1.5rem;
    border-radius: 2rem;
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin-bottom: 1rem; }
.footer-nav a { font-size: 0.875rem; color: var(--text-2); }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { font-size: 0.78rem; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
