/* Self-contained on purpose — no webfonts or CDN assets, matching the other
   static pages served by this API.

   Reading page for /terms and /privacy. Tokens mirror the mobile app's theme
   (elPlan-frontend/src/theme): primary blues, gray scale and system fonts.
   Dark mode maps to the app's dark theme tokens (#111827 background, like the
   splash). */

:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --bg: #FFFFFF;
    --surface: #F3F4F6;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827;
        --surface: #1F2937;
        --text-primary: #FBFAFB;
        --text-secondary: #9CA3AF;
        --border: #374151;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.topbar .home img {
    display: block;
}

.doc-nav {
    display: flex;
    gap: 18px;
}

.doc-nav a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.doc-nav a:hover {
    text-decoration: underline;
}

.doc {
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.langs .lang {
    margin-left: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.langs .lang.current {
    color: var(--text-secondary);
}

.doc h1 {
    font-size: 1.7rem;
    line-height: 1.25;
    margin: 0 0 16px;
}

.doc h2 {
    font-size: 1.15rem;
    margin: 28px 0 8px;
}

.doc p {
    margin: 0 0 12px;
}

.doc a {
    color: var(--primary);
}

.footer {
    padding: 18px 20px;
    text-align: center;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer p {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.footer .tr4 {
    font-weight: 700;
}
