/* ── TOKENS ─────────────────────────────────────────────── */
:root {
    --bg: #040D12;
    --bg-raised: #071519;
    --surface: #0d2424;
    --surface-2: #132e2e;
    --border: rgba(147, 177, 166, 0.12);
    --border-hover: rgba(147, 177, 166, 0.28);
    --accent: #93B1A6;
    --accent-dim: rgba(147, 177, 166, 0.12);
    --accent-glow: rgba(147, 177, 166, 0.06);
    --green: rgb(86, 200, 150);
    --green-dim: rgba(86, 200, 150, 0.12);
    --amber: #e8a84a;
    --amber-dim: rgba(232, 168, 74, 0.12);
    --text-1: #edf2f0;
    --text-2: #8faaa0;
    --text-3: #5a7a70;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --font-head: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --content-max: 740px;
    --sidebar-w: 240px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-1);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--surface-2);
    color: var(--accent);
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-raised);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ── NAV ────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 3rem);
    max-width: 1060px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: rgba(4, 13, 18, 0.80);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: border-color var(--transition);
}

.navbar:hover {
    border-color: var(--border-hover);
}

.nav-logo {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav-logo span {
    color: var(--text-2);
    font-weight: 400;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-back:hover {
    color: var(--text-1);
    border-color: var(--border-hover);
    background: var(--accent-glow);
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.page-wrapper {
    display: flex;
    gap: 3.5rem;
    max-width: 1060px;
    margin: 0 auto;
    padding: 7.5rem 2rem 6rem;
    align-items: flex-start;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 6rem;
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
    padding-bottom: 1rem;
}

.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 99px;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-nav a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-2);
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
    line-height: 1.4;
}

.sidebar-nav a:hover {
    color: var(--text-1);
    background: var(--accent-glow);
    border-left-color: var(--accent);
}

.sidebar-nav a.active {
    color: var(--accent);
    background: var(--accent-dim);
    border-left-color: var(--accent);
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.content {
    flex: 1;
    min-width: 0;
}

/* Hero block */
.doc-header {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.doc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    margin-bottom: 1.25rem;
}

.doc-eyebrow::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.doc-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-1);
    line-height: 1.15;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.doc-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.doc-meta-item {
    font-size: 0.82rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-meta-item svg {
    color: var(--accent);
}

.doc-intro {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 620px;
}

/* Sections */
.policy-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 6rem;
}

.section-anchor {
    display: block;
    position: relative;
    top: -6rem;
    visibility: hidden;
    pointer-events: none;
}

.section-number {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-body {
    color: var(--text-2);
    font-size: 0.94rem;
    line-height: 1.75;
}

.section-body p + p {
    margin-top: 0.9rem;
}

.section-body p strong {
    color: var(--text-1);
    font-weight: 600;
}

.section-body a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

.section-body a:hover {
    color: var(--text-1);
}

/* Subsections */
.subsection {
    margin-top: 1.5rem;
}

.subsection-title {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

/* Lists */
.policy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.policy-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.93rem;
    color: var(--text-2);
    line-height: 1.6;
}

.policy-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 0.55rem;
}

.policy-list li strong {
    color: var(--text-1);
    font-weight: 600;
}

/* Callout boxes */
.callout {
    display: flex;
    gap: 1rem;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

.callout.green {
    background: var(--green-dim);
    border-left-color: var(--green);
}

.callout.amber {
    background: var(--amber-dim);
    border-left-color: var(--amber);
}

.callout svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.callout.green svg {
    color: var(--green);
}

.callout.amber svg {
    color: var(--amber);
}

.callout:not(.green):not(.amber) svg {
    color: var(--accent);
}

.callout strong {
    color: var(--text-1);
}

.callout a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.callout a:hover {
    color: var(--text-1);
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.85rem 1rem;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

.data-table td:first-child {
    color: var(--text-1);
    font-weight: 500;
    white-space: nowrap;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--accent-glow);
}

.table-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    overflow-x: auto;
    margin-top: 1.25rem;
}

.table-wrapper::-webkit-scrollbar {
    height: 0;
}

/* Divider */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 0 0 3.5rem;
}

/* Contact card */
.contact-card {
    background: linear-gradient(135deg, rgba(24, 61, 61, 0.3) 0%, rgba(4, 13, 18, 0.4) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.contact-card-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
}

.contact-card-desc {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.6;
}

.contact-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.contact-card a:hover {
    color: var(--text-1);
}

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
}

.footer-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo-small {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent);
    text-decoration: none;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-3);
}

.footer-links-row {
    display: flex;
    gap: 1.5rem;
}

.footer-links-row a {
    font-size: 0.8rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links-row a:hover {
    color: var(--text-2);
}

/* ── MOBILE TOC TOGGLE ──────────────────────────────────── */
.mobile-toc-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-1);
    cursor: pointer;
    margin-bottom: 2rem;
    transition: border-color var(--transition);
}

.mobile-toc-toggle:hover {
    border-color: var(--border-hover);
}

.mobile-toc-toggle svg {
    transition: transform 0.2s;
}

.mobile-toc-toggle.open svg {
    transform: rotate(180deg);
}

.mobile-toc {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 2rem;
}

.mobile-toc.visible {
    display: block;
}

.mobile-toc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.mobile-toc ul a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-2);
    text-decoration: none;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.mobile-toc ul a:hover {
    color: var(--text-1);
    background: var(--accent-glow);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
    .sidebar {
        display: none;
    }

    .page-wrapper {
        gap: 0;
        padding-top: 6.5rem;
    }

    .mobile-toc-toggle {
        display: flex;
    }
}

@media (max-width: 640px) {
    .navbar {
        top: 0.5rem;
        width: calc(100% - 1.5rem);
        border-radius: var(--radius-xl);
    }

    .nav-logo {
        font-size: 1.1rem;
    }


    .page-wrapper {
        padding: 5.5rem 1.25rem 4rem;
    }

    .doc-title {
        font-size: 1.6rem;
    }

    .data-table {
        font-size: 0.82rem;
    }

    .data-table th, .data-table td {
        padding: 0.65rem 0.75rem;
    }

    .contact-card {
        padding: 1.25rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ── FADE IN ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-header {
    animation: fadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.policy-section {
    animation: fadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}