/* Core Variables */
:root {
    --bg-primary: #020617;
    /* Deeper blue-black */
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --accent-hover: #4f46e5;

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --error: #ef4444;

    --border: rgba(148, 163, 184, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);

    --font-heading: 'Outfit', 'Inter', sans-serif;
    /* Recommend Outfit for headings if available, else Inter */
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.1) 0%, transparent 30%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
    max-width: 65ch;
    margin: 0 auto;
    /* Center the block */
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.2s;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

header .container {
    max-width: 100%;
    padding: 1.7rem;
}

/* Header */
header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: #fff;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.logo-text {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.logo svg {
    height: 32px;
    width: auto;
}

/* Navigation */
nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.hero h1 {
    max-width: 25ch;
    margin-left: auto;
    margin-right: auto;
}

.hero .status-badge {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Glass Cards */
.card {
    background: radial-gradient(circle at top left, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    background: radial-gradient(circle at top left, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Card Icons */
.card h3 {
    margin: 1rem 0 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    font-size: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Terminal / Code Blocks */
.copy-wrapper {
    margin-top: 1.5rem;
    background: #0d1117;
    /* GitHub Dark Dim-like */
    border: 1px solid #30363d;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Terminal Header with Glowing Dots */
.copy-wrapper::before {
    content: "";
    display: flex;
    gap: 6px;
    background: #161b22;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #30363d;
}

.copy-wrapper {
    position: relative;
}

.copy-wrapper::before {
    content: "";
    display: block;
    position: relative;
    width: 100%;
    height: 28px;
    background:
        radial-gradient(circle at 16px 14px, #ff5f56, #ff5f56 5px, transparent 5px),
        radial-gradient(circle at 34px 14px, #ffbd2e, #ffbd2e 5px, transparent 5px),
        radial-gradient(circle at 52px 14px, #27c93f, #27c93f 5px, transparent 5px),
        #161b22;
    border-bottom: 1px solid #30363d;
    box-shadow:
        16px 0 8px -8px rgba(255, 95, 86, 0.4),
        34px 0 8px -8px rgba(255, 189, 46, 0.4),
        52px 0 8px -8px rgba(39, 201, 63, 0.4);
}

/* Section Headers */
section h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

pre {
    padding: 1.25rem;
    padding-right: 3.5rem;
    /* Space for copy button */
    overflow-x: hidden;
    /* Prevent scrollbar */
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e6edf3;
    background: transparent;
    border: none;
    margin: 0;
    white-space: pre-wrap;
    /* Wrap text */
    word-break: break-all;
    /* Break long words */
}

code {
    font-family: inherit;
}

.copy-btn {
    position: absolute;
    top: 0.4rem;
    /* Inside the header */
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    font-weight: 500;
}

.copy-wrapper:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* Footer */
footer {
    margin-top: 8rem;
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    background: #020617;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 99px;
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .flow-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2rem !important;
        width: 100% !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .flow-column {
        max-width: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        /* Revert to vertical for professional stacking */
        align-items: center !important;
        justify-content: center !important;
        gap: 1.5rem !important;
    }

    .source-group,
    .agent-card {
        flex: 0 1 280px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .flow-arrow {
        transform: rotate(90deg) !important;
        margin: 2rem auto !important;
        animation: flowPulseMobile 2s infinite !important;
        display: flex !important;
        justify-content: center !important;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        line-height: 1.2 !important;
    }

    .hero {
        padding: 3rem 0 2rem !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .process-flow {
        padding: 2.5rem 1rem !important;
        width: 100% !important;
        margin: 2rem 0 !important;
        border-radius: 0 !important;
        /* Full bleed background on mobile */
        border-right: none !important;
        border-left: none !important;
    }

    .hero .btn {
        margin: 0.5rem auto !important;
        width: auto !important;
        min-width: 180px !important;
        /* Optional: minimum logical width for call-to-action */
    }

    .status-badge {
        margin-bottom: 1.5rem !important;
        font-size: 0.75rem !important;
        padding: 0.25rem 0.75rem !important;
    }

    /* Professional Header for Mobile */
    .header-content {
        flex-direction: row !important;
        justify-content: space-between !important;
        height: 3.5rem !important;
        padding: 0 2.25rem !important;
        /* Aggressive padding to eliminate edge-pinning */
        gap: 0.25rem !important;
    }

    header .container {
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .logo {
        font-size: 0.75rem !important;
        /* Smaller logo to ensure nav room */
        gap: 0.25rem !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }

    .logo-text {
        white-space: nowrap !important;
    }

    .logo svg,
    .logo img {
        height: 24px !important;
        width: auto !important;
    }

    nav ul {
        gap: 0.75rem !important;
        /* Increased gap for tapability and clarity */
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    nav a {
        font-size: 0.75rem !important;
        padding: 0.2rem 0 !important;
        white-space: nowrap !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .source-group,
    .agent-card {
        flex: 0 1 auto !important;
        width: 100% !important;
        max-width: 320px !important;
        /* Uniform size */
        margin: 0 auto !important;
    }

    .logo-grid {
        justify-content: center !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        padding: 0.5rem !important;
    }
}

/* Extra Small Mobile (< 380px) */
@media (max-width: 380px) {
    .header-content {
        padding: 0 0.75rem !important;
        /* Tighten padding */
    }

    .logo-text {
        font-size: 0.75rem !important;
    }

    nav ul {
        gap: 0.3rem !important;
    }

    nav a {
        font-size: 0.7rem !important;
    }
}

/* Ultra Small Mobile (< 320px) */
@media (max-width: 320px) {
    .logo-text {
        display: none !important;
        /* Hide text to give room to links */
    }

    .header-content {
        padding: 0 0.5rem !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    nav ul {
        gap: 0.5rem !important;
    }
}

/* Process Flow Section */
/* Process Flow Section */
.process-flow {
    margin-bottom: 5rem;
    padding: 4rem 2rem;
    /* Balanced desktop padding */
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.4) 0%, rgba(2, 6, 23, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1.5rem;
    position: relative;
    overflow-x: hidden !important;
    box-shadow: 0 0 40px -10px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    width: 100%;
    /* Full bleed for seamless background */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box !important;
}

.process-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.flow-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.flow-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    /* Reset global section h2 absolute centering */
    display: block;
    left: auto;
    transform: none;
    width: 100%;
    text-align: center;
}

.flow-container {
    display: flex;
    align-items: stretch;
    /* Stretch layout */
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.flow-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 320px;
    /* Constrain columns */
}

.flow-label {
    text-align: center;
    font-size: 0.8rem;
    /* Bigger labels */
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    /* More space below bigger labels */
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.35rem 1rem;
    /* Bigger badge */
    border-radius: 99px;
    align-self: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Source Groups */
.source-group {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s;
    min-width: 100%;
    /* Fill column */
    min-height: 160px;
    /* Force height symmetry */
    display: flex;
    /* Flex to center content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center Horizontal */
}

.source-group:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.source-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.logo-grid {
    display: flex;
    gap: 1rem;
    /* More spacing */
}

.logo-item {
    width: 2.75rem;
    /* Bigger icons */
    height: 2.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.logo-item svg {
    width: 2rem;
    height: 2rem;
}

/* Arrows */
.flow-arrow {
    color: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
    width: 40px;
    animation: flowPulse 2s infinite;
    align-self: center;
    /* Center in stretch container */
    margin-top: 3.5rem;
    /* Adjusted for bigger labels */
}

@keyframes flowPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translateX(0);
    }

    50% {
        opacity: 0.8;
        transform: translateX(3px);
    }
}

@keyframes flowPulseMobile {

    0%,
    100% {
        opacity: 0.3;
        transform: rotate(90deg) translateX(0);
    }

    50% {
        opacity: 0.8;
        transform: rotate(90deg) translateX(3px);
    }
}

/* Center Orb */
.flow-center {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* True center */
    margin: 0 2rem;
    /* More spacing around orb */
    padding-top: 1.75rem;
    /* Moved up for better alignment */
}

.orbit-container {
    position: relative;
    width: 240px;
    /* Bigger orbit */
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: orbitSpin 10s linear infinite;
}

.orbit-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes orbitSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.core-orb {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4), inset 0 0 20px rgba(99, 102, 241, 0.2);
}

.core-orb::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), transparent, rgba(168, 85, 247, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.core-logo svg {
    width: 48px;
    /* Bigger logo */
    height: 48px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.core-text {
    font-weight: 700;
    margin-top: -1rem;
    font-size: 0.9rem;
    letter-spacing: -0.02em;
}

/* Agent Cards */
.agent-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    /* Match source-group */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.agent-dot {
    width: 6px;
    height: 6px;
    background: #eab308;
    border-radius: 50%;
}

.skeleton-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 0.4rem;
}

/* API Reference Section */
.api-details {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.api-summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.api-summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--accent-primary);
}

details[open] .api-summary::after {
    content: '−';
}

.api-table-wrapper {
    padding: 1rem 1.5rem;
    overflow-x: auto;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.api-table th,
.api-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.api-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.api-table td code {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.method {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.method.get {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.method.post {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.method.put {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.method.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Documentation Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin: 0 auto;
    max-width: 1440px;
    min-height: calc(100vh - 4.5rem);
}

.docs-sidebar {
    position: sticky;
    top: 4.5rem;
    height: calc(100vh - 4.5rem);
    padding: 2.5rem 1.5rem;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: rgba(2, 6, 23, 0.3);
}

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

.docs-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav li {
    margin-bottom: 0.5rem;
}

.docs-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
}

.docs-nav a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.docs-nav a.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

.docs-content {
    padding: 3rem 4rem 6rem 1rem;
    max-width: 900px;
}

.docs-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--text-primary);
}

.docs-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.docs-content p {
    margin: 0 0 1.5rem 0;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.docs-content code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.docs-content pre {
    background: #0d1117;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.docs-content pre code {
    background: transparent;
    color: #e6edf3;
    padding: 0;
    font-size: 0.9rem;
}

/* Mermaid Diagrams */
.mermaid {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.docs-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 4rem 0;
}

.docs-content ul,
.docs-content ol {
    margin: 0 0 1.5rem 1.5rem;
    padding: 0;
    color: var(--text-secondary);
}

.docs-content li {
    margin-bottom: 0.75rem;
}

/* Documentation Tablet Adjustments */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 220px 1fr;
        gap: 1.5rem;
    }

    .docs-content {
        padding: 2.5rem 2rem 5rem 0.5rem;
    }
}

/* Documentation Mobile Stack */
@media (max-width: 768px) {
    .docs-layout {
        display: block;
        /* Stack everything */
    }

    .docs-sidebar {
        position: sticky;
        top: 3.5rem;
        /* Match mobile header height */
        height: auto;
        width: 100%;
        padding: 0.75rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background: var(--bg-primary);
        z-index: 50;
        overflow-y: hidden;
        overflow-x: auto;
        /* Horizontal scroll for nav */
    }

    .docs-sidebar h3 {
        display: none;
        /* Hide "Documentation" label on mobile */
    }

    .docs-nav {
        display: flex;
        gap: 0.5rem;
        white-space: nowrap;
        padding-bottom: 0.25rem;
    }

    .docs-nav li {
        margin-bottom: 0;
    }

    .docs-nav a {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .docs-nav a.active {
        border-bottom-color: var(--accent-primary);
        background: rgba(99, 102, 241, 0.1);
    }

    .docs-content {
        padding: 2rem 1.5rem 4rem;
        max-width: 100%;
    }

    .docs-content h1 {
        font-size: 2.25rem;
    }

    .docs-content h2 {
        font-size: 1.75rem;
    }
}