:root {
    --bg: #0a0a0a;
    --bg-2: #111111;
    --bg-3: #1a1a1a;
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.18);
    --text: #e8e8e8;
    --text-dim: rgba(255,255,255,0.45);
    --text-mid: rgba(255,255,255,0.7);
    --accent-red: #ff4444;
    --mono: 'Geist Mono', monospace;
    --sans: 'Geist', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.75;
    min-height: 100vh;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 56px;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span { color: var(--text-dim); }

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ── LAYOUT ── */
.page-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1100px;
    padding-top: 56px;
    min-height: 100vh;
    margin-left:10rem;
}

/* ── SIDEBAR ── */
aside {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 48px 24px 48px 0;
    border-right: 1px solid var(--border);
}

aside::-webkit-scrollbar { width: 4px; }
aside::-webkit-scrollbar-track { background: transparent; }
aside::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section { margin-bottom: 28px; }

.sidebar-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-left: 12px;
}

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

.sidebar-nav a {
    display: block;
    font-size: 13px;
    color: var(--text-mid);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 5px;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--text);
    background: var(--bg-3);
    border-left-color: rgba(255,255,255,0.5);
}

/* ── MAIN ── */
main {
    padding: 48px 0 80px 56px;
    min-width: 0;
}

/* ── HERO ── */
.doc-hero {
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
    animation: fadeUp 0.45s ease both;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.doc-hero h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.doc-hero h1 em {
    font-style: normal;
    color: var(--text-dim);
}

.doc-hero .lead {
    font-size: 15px;
    color: var(--text-mid);
    max-width: 560px;
    line-height: 1.65;
}

.effective-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
}

.effective-date::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7dda7d;
}

/* ── SECTIONS ── */
.doc-section {
    margin-bottom: 56px;
    scroll-margin-top: 80px;
    animation: fadeUp 0.45s ease both;
}

.section-num {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.doc-section h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    color: var(--text);
}

.doc-section p {
    color: var(--text-mid);
    margin-bottom: 14px;
    max-width: 640px;
}

.doc-section p:last-child { margin-bottom: 0; }

/* ── CLAUSE LIST ── */
.clause-list {
    list-style: none;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 640px;
}

.clause-list li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-mid);
    font-size: 14px;
    line-height: 1.6;
}

.clause-list li:last-child { border-bottom: none; }

.clause-list li::before {
    content: '—';
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: 12px;
    padding-top: 1px;
}

/* ── CALLOUT ── */
.callout {
    border: 1px solid var(--border);
    border-left: 3px solid rgba(255,255,255,0.25);
    background: var(--bg-2);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    font-size: 13px;
    color: var(--text-mid);
    max-width: 640px;
    line-height: 1.6;
}

.callout strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.callout.warn {
    border-left-color: var(--accent-red);
}

.callout.info {
    border-left-color: #82b0ff;
}

/* ── DEFINITION TABLE ── */
.def-table {
    width: 100%;
    max-width: 640px;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.def-table th {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.def-table td {
    padding: 12px 14px;
    color: var(--text-mid);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

.def-table tr:last-child td { border-bottom: none; }
.def-table tr:hover td { background: var(--bg-3); }

.def-table td:first-child {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    font-weight: 600;
}

/* ── DIVIDER ── */
.doc-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
    max-width: 640px;
}

/* ── CONTACT BLOCK ── */
.contact-block {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    max-width: 480px;
    margin-top: 20px;
}

.contact-block h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.contact-block p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
    max-width: unset;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 40px;
    text-align: center;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--text); }

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

.doc-section:nth-child(2)  { animation-delay: 0.04s; }
.doc-section:nth-child(3)  { animation-delay: 0.08s; }
.doc-section:nth-child(4)  { animation-delay: 0.12s; }
.doc-section:nth-child(5)  { animation-delay: 0.16s; }
.doc-section:nth-child(6)  { animation-delay: 0.20s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        margin-left: 0; 
    }
    aside { display: none; }
    main { padding: 32px 24px; }
    nav { padding: 0 20px; }
    .nav-links { display: none; }
    .doc-hero h1 { font-size: 28px; }
}