:root {
    color-scheme: dark;
    --background: #111722;
    --surface: #1d2430;
    --surface-raised: #232c3a;
    --border: #364154;
    --text: #f7f9ff;
    --muted: #bdc8dc;
    --primary: #5f7cff;
    --primary-soft: rgba(95, 124, 255, 0.14);
    --success: #45d49d;
    --warning: #f1bd59;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 500px at 8% -8%, rgba(95, 124, 255, 0.18), transparent),
        radial-gradient(900px 480px at 100% 0%, rgba(69, 212, 157, 0.1), transparent),
        var(--background);
    color: var(--text);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

h1,
h2,
h3,
.navbar a {
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.15;
}

h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.3;
}

h3 {
    margin: 1.35rem 0 0.35rem;
    font-size: 1.05rem;
}

p {
    margin: 0 0 0.85rem;
}

ul,
ol {
    margin: 0.65rem 0 1rem;
    padding-left: 1.35rem;
}

li {
    margin-bottom: 0.55rem;
}

a {
    color: #9db4ff;
}

a:hover {
    color: #c3d0ff;
}

code {
    padding: 0.12rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #151b25;
    color: var(--text);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0.75rem max(1rem, calc((100vw - 1040px) / 2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(11, 16, 22, 0.88);
    backdrop-filter: blur(14px);
}

.navbar a {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.container {
    width: min(1040px, calc(100% - 32px));
    margin: 24px auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(29, 36, 48, 0.96);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.22);
}

.policy-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.updated,
.lead,
.section-intro {
    color: var(--muted);
}

.lead {
    max-width: 760px;
    margin-top: 0.9rem;
    font-size: 1.08rem;
}

.updated {
    margin: 0;
    font-size: 0.9rem;
}

.summary,
.toc,
.what-this-means,
.notice {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-raised);
}

.summary {
    margin-top: 1.5rem;
    padding: 1.25rem;
}

.summary h2 {
    margin-bottom: 0.75rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.summary-item {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(17, 23, 34, 0.55);
}

.summary-item strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--success);
}

.summary-item span {
    color: var(--muted);
    font-size: 0.94rem;
}

.toc {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
}

.toc strong {
    display: block;
    margin-bottom: 0.45rem;
}

.toc ol {
    columns: 2;
    margin-bottom: 0;
}

.policy-section {
    padding: 1.8rem 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 88px;
}

.policy-section:last-of-type {
    border-bottom: 0;
}

.policy-section > h2 + p,
.policy-section > h2 + .section-intro {
    margin-top: 0.5rem;
}

.what-this-means,
.notice {
    margin-top: 1.2rem;
    padding: 1rem 1.1rem;
}

.what-this-means {
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
}

.notice {
    border-left: 3px solid var(--warning);
}

.what-this-means strong,
.notice strong {
    display: block;
    margin-bottom: 0.25rem;
}

.what-this-means p,
.notice p {
    margin: 0;
}

.footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(11, 16, 22, 0.84);
    color: #929db1;
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .toc ol {
        columns: 1;
    }

    .container {
        width: min(1040px, calc(100% - 20px));
        margin: 10px auto;
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
