:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #495057;
    --link-color: #0c66ea;
    --border-color: #dee2e6;
    --hover-bg: #e9ecef;
    --focus-outline: 2px solid #89b4fa;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--link-color);
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #d087ff;
    outline-offset: 2px;
}

.page-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(248, 249, 250, 0.95);
}

.header-content {
    max-width: 720px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    word-wrap: break-word;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-style: normal;
}

.intro {
    font-size: 1rem;
    margin-bottom: 20px;
}

.policy-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 16px;
}

.policy-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 8px;
    padding-top: 12px;
}

.policy-section > p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.policy-section ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.policy-section li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.policy-section a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.policy-section a:hover {
    opacity: 0.8;
}

.toc {
    margin-top: 16px;
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.toc h2 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    border: none;
    padding-bottom: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 4px;
}

.toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.toc a:hover {
    background: var(--hover-bg);
    color: var(--link-color);
}

.toc a:focus-visible {
    outline: var(--focus-outline);
    background: var(--hover-bg);
}

.toc a.active {
    background: #f0f8ff;
    color: var(--link-color);
    font-weight: 500;
}

.page-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .header-content {
        padding: 0 4px;
    }

    .toc {
        margin-top: 12px;
        padding: 4px;
    }

    .toc h2 {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .toc ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .toc a {
        padding: 6px 8px;
        font-size: 0.8rem;
        text-align: center;
        white-space: nowrap;
    }

    .policy-section {
        padding: 24px 8px;
    }

    .policy-section h2 {
        font-size: 1.25rem;
    }
}

/* Print styles */
@media print {
    .toc,
    .skip-link,
    .page-header {
        display: none;
    }

    .policy-section {
        page-break-inside: avoid;
        padding: 0;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        text-decoration: underline;
        color: #000;
    }
}