/* ===================================================================
   Legal / content pages: shared styling
   Mirrors the theme tokens used in index.html (Signal Purple #512BD4).
   Used by terms.html, privacy.html and security.html.
   =================================================================== */
:root {
    --brand: #512BD4;
    --brand-2: #7C5EE8;
    --brand-3: #a078ff;
    --brand-soft: #EADDFF;
    --brand-ring: rgba(81, 43, 212, 0.35);

    --bg: #FFFFFF;
    --bg-muted: #F9FAFB;
    --surface: #FFFFFF;
    --surface-2: #F7FAFC;
    --surface-3: #F0F2F5;
    --border: #E2E8F0;

    --text: #1C1B1F;
    --text-muted: #49454F;
    --text-subtle: #718096;

    --warning: #F59E0B;

    --radius: 14px;
    color-scheme: light;
}

[data-theme="dark"] {
    --brand: #a078ff;
    --brand-2: #b794ff;
    --brand-3: #d0bcff;
    --brand-soft: rgba(160, 120, 255, 0.12);
    --brand-ring: rgba(160, 120, 255, 0.45);

    --bg: #0F0F0F;
    --bg-muted: #141414;
    --surface: #1A1A1A;
    --surface-2: #1F1F1F;
    --surface-3: #242424;
    --border: #2A2A2A;

    --text: #E8E8E8;
    --text-muted: #CAC4D0;
    --text-subtle: #A0AEC0;

    color-scheme: dark;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { display: block; }
ul, ol { list-style: none; }

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

/* ---- Navigation ---- */
nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px; gap: 1rem; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; flex-shrink: 0; box-shadow: 0 4px 12px var(--brand-ring); }
.logo-mark svg { width: 34px; height: 34px; }
.lm-bg { fill: #4B2BD4; } .lm-fg { stroke: #FFFFFF; } .lm-fg-fill { fill: #FFFFFF; } .lm-core { fill: #4B2BD4; }
[data-theme="dark"] .lm-bg { fill: #1C1B1B; }
[data-theme="dark"] .lm-fg { stroke: #D0BCFF; }
[data-theme="dark"] .lm-fg-fill { fill: #D0BCFF; }
[data-theme="dark"] .lm-core { fill: #1C1B1B; }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-back { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.nav-back:hover { color: var(--brand); text-decoration: none; }
.theme-toggle {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); display: grid; place-items: center; color: var(--text-muted);
    transition: all 0.2s ease; flex-shrink: 0;
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---- Legal document body ---- */
.legal { padding: 3.5rem 0 4.5rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 0.6rem; }
.legal-meta { color: var(--text-subtle); font-size: 0.9rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; margin: 2.5rem 0 0.85rem; padding-top: 0.5rem; }
.legal h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.6rem; }
.legal p { color: var(--text-muted); margin-bottom: 0.9rem; }
.legal ul, .legal ol { color: var(--text-muted); margin: 0 0 1rem 0; padding-left: 1.25rem; }
.legal ul li { list-style: disc; margin-bottom: 0.5rem; }
.legal ol li { list-style: decimal; margin-bottom: 0.5rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.legal .clause { color: var(--text-muted); margin-bottom: 0.9rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; font-size: 0.9rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: 0.6rem 0.7rem; text-align: left; vertical-align: top; color: var(--text-muted); }
.legal th { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* Draft notice banner */
.legal-banner {
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2.25rem;
}
.legal-banner strong { color: var(--text); }

/* "to be confirmed" placeholder for fields only the entity owner can supply */
.tbc {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--text);
    font-weight: 600;
    padding: 0 0.3rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Highlight cards (used on security.html) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0 0.5rem; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.35rem 1.4rem;
}
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; font-size: 0.92rem; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--border); background: var(--bg-muted); padding: 2.5rem 0; }
.footer-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
    font-size: 0.85rem; color: var(--text-subtle);
}
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-subtle); }
.footer-links a:hover { color: var(--brand); }

@media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
}
