:root {
    --color-bg:         #F5F3EC;
    --color-bg-alt:     #EBE9E1;
    --color-bg-subtle:  #F8F7F3;
    --color-bg-dark:    #111111;
    --color-accent:     #2B31D1;
    --color-green:      #22C55E;
    --color-text:       #1A1A1A;
    --color-muted:      #6B6B6B;
    --color-border:     #E4E4DF;
    --color-border-lt:  rgba(0,0,0,0.07);
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    background-color: var(--color-bg) !important;
    color: var(--color-text) !important;
}
::-webkit-scrollbar { width: 5px !important; }
::-webkit-scrollbar-track { background: var(--color-bg-alt) !important; }
::-webkit-scrollbar-thumb { background: #ccc !important; border-radius: 4px !important; }
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.fade-in.visible { opacity: 1; transform: none; }
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal.on { opacity: 1; transform: none; }
.section-eyebrow {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--color-accent);
    display: block;
    margin-bottom: .6rem;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    color: var(--color-muted);
    font-weight: 500;
}
.breadcrumb a { color: var(--color-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb-sep { opacity: .4; }
.hero-stripe {
    background: var(--primary-blue);
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.07) 1px, transparent 0);
    background-size: 40px 40px;
    border-bottom: none;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 100px;
    padding: .35rem .9rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary-yellow);
}
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    max-width: 1180px;
    margin: 0 auto;
    min-height: 60vh;
}
.docs-sidebar {
    border-right: 1px solid var(--color-border);
    padding: 2rem 1.5rem 3rem;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.sidebar-label {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: .75rem;
    padding-left: .5rem;
}
.quick-link {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: .48rem .5rem;
    border-radius: 6px;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--color-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: background .18s, color .18s;
    text-decoration: none;
}
.quick-link:hover { background: var(--color-bg-alt); color: var(--color-text); }
.quick-link .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-border);
    flex-shrink: 0;
    margin-top: .42rem;
    transition: background .18s;
}
.quick-link:hover .dot { background: var(--color-accent); }
.quick-link.active { color: var(--color-text); background: var(--color-bg-alt); }
.quick-link.active .dot { background: var(--color-accent); }
.docs-content { padding: 2.5rem 2.5rem 4rem; }
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.legal-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    border-left: 3px solid transparent;
    padding: 1.75rem 2rem;
    transition: border-color .22s, box-shadow .22s, border-left-color .22s;
    overflow: hidden;
    scroll-margin-top: 100px;
}
.legal-section:hover {
    border-color: var(--color-border);
    border-left-color: rgba(43,49,209,.4);
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}
.legal-section:target {
    border-left-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(43,49,209,.08);
}
.legal-section h2 {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: var(--color-text) !important;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-wrap: break-word;
    word-break: break-word;
}
.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    border-radius: 4px;
    background: rgba(43,49,209,.1);
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 800;
    flex-shrink: 0;
    font-family: 'SF Mono','Fira Code',monospace;
    letter-spacing: .04em;
    padding: 0 .4rem;
}
.legal-section h3 {
    font-size: .875rem !important;
    font-weight: 700 !important;
    color: var(--color-text) !important;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
}
.legal-section p {
    color: var(--color-muted) !important;
    font-size: .875rem;
    line-height: 1.78;
    margin-bottom: 0.75rem;
    overflow-wrap: break-word;
}
.legal-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.legal-section li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    color: var(--color-muted);
    font-size: .875rem;
    line-height: 1.72;
    overflow-wrap: break-word;
}
.legal-section li::before {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
    margin-top: 0.55em;
    opacity: .5;
}
.legal-section strong { color: var(--color-text); font-weight: 700; }
.highlight-box {
    background: rgba(43,49,209,.05);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 6px 6px 0;
    padding: .875rem 1.125rem;
    margin: .75rem 0;
    font-size: .85rem;
    color: var(--color-accent);
    line-height: 1.7;
    overflow-wrap: break-word;
}
@media (max-width: 1023px) {
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar { display: none; }
    .docs-content { padding: 1.5rem 1.25rem 3rem; }
}
@media (max-width: 768px) {
    main { overflow-x: hidden; max-width: 100%; }
    .legal-section { padding: 1.25rem 1.1rem; }
    .legal-section h2 { font-size: .95rem !important; }
}
