:root {
    /* Color Palette - Premium Dark */
    --bg-color: #050505;
    --sidebar-bg: #0a0a0a;
    --card-bg: #0f0f0f;
    --card-hover: #161616;
    --border-color: #222;
    --border-hover: #333;
    
    /* Typography Colors */
    --text-primary: #EDEDED;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --link-color: #38BDF8; /* Sky-400 equivalent for better readability */
    
    /* Brand Accents */
    --accent-cyan: #A5F3FC;
    --accent-cyan-dim: rgba(165, 243, 252, 0.08);
    --highlight-yellow: #FEF9C3;
    --highlight-yellow-dim: rgba(254, 249, 195, 0.08);
    --warning-red: #F87171;
    --warning-red-dim: rgba(248, 113, 113, 0.08);
    
    /* Metrics */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 1rem;     /* 16px */
    --spacing-md: 1.5rem;   /* 24px */
    --spacing-lg: 3rem;     /* 48px */
    --spacing-xl: 5rem;     /* 80px */
    
    --header-height: 64px;
    --sidebar-width: 260px;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --transition: 0.15s ease-out;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.2);
    --glow-cyan: 0 0 20px rgba(165, 243, 252, 0.05);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 40px);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
}

/* Layout */
.docs-layout {
    display: flex;
    min-height: 100vh;
}

/* Header */
.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.logo-img {
    width: 24px;
    height: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.header-link:hover {
    color: var(--text-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

/* Sidebar */
.docs-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 32px 0;
    z-index: 90;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar-group {
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    font-weight: 700;
    padding: 0 24px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.sidebar-link {
    display: block;
    padding: 6px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    border-left: 1px solid transparent;
    position: relative;
}

.sidebar-link:hover {
    color: var(--text-primary);
}

.sidebar-link.active {
    color: var(--accent-cyan);
    font-weight: 500;
    border-left-color: var(--accent-cyan);
    background: linear-gradient(90deg, var(--accent-cyan-dim) 0%, transparent 100%);
}

/* Main Content Area */
.docs-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: calc(var(--header-height) + 48px) 64px 120px;
    max-width: 960px; /* Optimal reading width + padding */
}

/* Typography Polish */
h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 400;
    line-height: 1.6;
    max-width: 680px;
}

h2 {
    font-size: 1.75rem;
    margin-top: 64px;
    margin-bottom: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.25rem;
    margin-top: 40px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 720px; /* Reading line length */
}

ul, ol {
    margin-bottom: 24px;
    padding-left: 20px;
    color: var(--text-secondary);
    max-width: 720px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
}

li::marker {
    color: var(--text-muted);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

a:hover {
    color: #7DD3FC;
    border-bottom-color: #7DD3FC;
}

/* Refined Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0 48px;
}

.docs-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.docs-card:hover {
    background-color: var(--card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.docs-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.docs-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Premium Callouts */
.callout {
    padding: 20px 24px;
    border-radius: var(--border-radius);
    margin: 32px 0;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.callout-info {
    background-color: rgba(165, 243, 252, 0.05);
    border-color: rgba(165, 243, 252, 0.1);
}

.callout-info h4 {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.callout-warning {
    background-color: rgba(248, 113, 113, 0.05);
    border-color: rgba(248, 113, 113, 0.1);
}

.callout-warning h4 {
    color: var(--warning-red);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.callout p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 100%;
}

/* Polished Tables */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 32px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: var(--card-bg);
}

th, td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-primary);
    font-weight: 600;
    background-color: #161616;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-secondary);
}

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

tr:hover td {
    background-color: rgba(255,255,255,0.02);
}

/* Code Blocks */
pre {
    background-color: #0d0d0d;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin: 24px 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}

code {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    background: rgba(165, 243, 252, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85em;
}

pre code {
    background: transparent;
    padding: 0;
    color: #e5e5e5;
    font-size: 1em;
}

/* Step List (Numbered) */
.step-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
    margin-top: 32px;
}

.step-list li {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 40px;
}

.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.25rem;
    height: 2.25rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.step-list li::after {
    content: '';
    position: absolute;
    left: 1.1rem;
    top: 2.5rem;
    bottom: -1.5rem;
    width: 1px;
    background-color: var(--border-color);
}

.step-list li:last-child::after {
    display: none;
}

.step-title {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 1.1rem;
}

/* Roadmap Visuals */
.roadmap-container {
    margin-top: 48px;
    border-left: 2px solid var(--border-color);
    margin-left: 12px;
}

.roadmap-item {
    padding-left: 40px;
    padding-bottom: 64px;
    position: relative;
}

.roadmap-item:last-child {
    padding-bottom: 0;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    left: -7px; /* Center on the 2px line */
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 0 4px rgba(165, 243, 252, 0.1);
}

.roadmap-quarter {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-weight: 700;
}

/* FAQ Details/Summary */
details.faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
}

details.faq-item:hover {
    border-color: var(--border-hover);
}

summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    transition: transform 0.2s;
}

details[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: -1px; /* Overlap border */
    padding-top: 16px;
    font-size: 0.95rem;
}

/* Download CTA Strip */
.download-cta-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease-out;
}

.download-cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 960px;
    width: 100%;
    justify-content: space-between;
}

.download-cta-text {
    display: flex;
    flex-direction: column;
}

.download-cta-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.download-cta-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.download-cta-btn {
    background-color: var(--accent-cyan);
    color: #000;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.download-cta-btn:hover {
    background-color: #7DD3FC;
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(165, 243, 252, 0.2);
}

/* Adjust layout to prevent CTA overlap */
.docs-layout {
    padding-bottom: 60px;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-content {
        padding: calc(var(--header-height) + 32px) 32px 100px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --sidebar-width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .docs-header {
        padding: 0 16px;
    }

    .docs-sidebar {
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        background-color: var(--bg-color);
        height: auto;
        bottom: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px 0;
        opacity: 0;
        pointer-events: none;
    }

    .docs-sidebar.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .docs-content {
        margin-left: 0;
        padding: calc(var(--header-height) + 32px) 20px 100px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }

    .download-cta-content {
        flex-direction: row;
        gap: 12px;
    }

    .download-cta-title {
        font-size: 0.9rem;
    }

    .download-cta-subtitle {
        font-size: 0.75rem;
    }
}
