/*
 * Shared styles for the legal pages (privacy policies, child safety standards).
 *
 * These pages are plain HTML + this one stylesheet, with no Tailwind, so they load fast
 * and stay readable even if a CDN is down. Colors and font match the home page
 * (index.html): dark slate background, violet accent, sky-blue links, Inter font.
 */

:root {
    --bg: #0f172a;          /* page background (slate 900), same as index.html */
    --surface: #1e293b;     /* cards and header (slate 800) */
    --border: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;        /* headings */
    --text-body: #cbd5e1;   /* paragraph text (slate 300), softer for long reading */
    --text-muted: #94a3b8;  /* dates, footer (slate 400) */
    --accent: #8b5cf6;      /* brand violet */
    --link: #38bdf8;        /* brand sky blue */
    --link-hover: #7dd3fc;
    --radius: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-body);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(56, 189, 248, 0.4);
    text-underline-offset: 3px;
    overflow-wrap: anywhere; /* long URLs and emails must not cause sideways scrolling on phones */
}

a:hover {
    color: var(--link-hover);
    text-decoration-color: currentColor;
}

/* Visible keyboard focus ring for accessibility */
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Hidden until focused: lets keyboard users jump straight past the header */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 16px;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    min-height: 48px; /* minimum touch target size */
}

.brand svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.brand .accent {
    color: var(--accent);
}

.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 4px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.back-link:hover {
    color: var(--text);
}

/* ---------- Main document ---------- */

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 16px 64px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
}

@media (min-width: 640px) {
    main {
        padding-top: 64px;
    }

    .document {
        padding: 48px;
    }
}

.document h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.document h2 {
    margin: 40px 0 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 1.375rem;
    line-height: 1.3;
    font-weight: 700;
}

.document h3 {
    margin: 28px 0 8px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
}

.document p {
    margin: 0 0 16px;
}

/* The first paragraph after the title holds the effective or updated date */
.document h1 + p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.document ul,
.document ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.document li {
    margin-bottom: 8px;
}

.document li > ul,
.document li > ol {
    margin-top: 8px;
}

.document li::marker {
    color: var(--accent);
}

.document strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 16px 48px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.site-footer .inner {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
}

.site-footer ul {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
}

.site-footer li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    text-decoration: none;
}

.site-footer li a:hover,
.site-footer li a[aria-current="page"] {
    color: var(--text);
}

.site-footer p {
    margin: 0;
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .site-header,
    .site-footer,
    .skip-link,
    .eyebrow {
        display: none;
    }

    .document {
        border: 0;
        padding: 0;
        background: none;
    }

    .document h1,
    .document h2,
    .document h3,
    .document strong {
        color: #000;
    }

    a {
        color: #000;
    }
}
