:root {
    --bg-canvas: #030304;
    --bg-surface: #0a0c10;
    --bg-surface-elevated: #11141b;
    --bg-surface-card: #0d1017;
    --bg-code: #06080d;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
    --border-hover: rgba(247, 147, 26, 0.45);
    --accent-orange: #F7931A;
    --accent-amber: #F59E0B;
    --accent-gold: #FFD600;
    --accent-glow: rgba(247, 147, 26, 0.16);
    --accent-glow-subtle: rgba(247, 147, 26, 0.07);
    --accent-blue: #38BDF8;
    --accent-green: #10B981;
    --accent-purple: #A855F7;
    --accent-rose: #F43F5E;
    
    /* Rounded Radii in Valyrix Style */
    --radius-modal: 24px;
    --radius-card: 20px;
    --radius-box: 16px;
    --radius-control: 12px;
    --radius-pill: 9999px;
    
    --header-height: 64px;
    --sidebar-width: 290px;
    --toc-width: 275px;
    --content-max-width: 860px;
}

@font-face {
    font-family: 'Quicksand';
    src: url('fonts/quicksand_light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('fonts/quicksand_regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('fonts/quicksand_medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('fonts/quicksand_semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Quicksand';
    src: url('fonts/quicksand_bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains_mono_regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains_mono_medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains_mono_semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

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

html {
    color-scheme: dark;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
}

body {
    background-color: var(--bg-canvas);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(247, 147, 26, 0.08) 0%, transparent 55%),
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 36px 36px, 36px 36px;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -60px;
    left: 20px;
    background: var(--accent-orange);
    color: #030304;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-pill);
    z-index: 9999;
    transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(247, 147, 26, 0.4);
}
.skip-link:focus {
    top: 16px;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s ease;
}
a:hover {
    color: #FBBF24;
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 3px;
    border-radius: var(--radius-control);
}

/* =========================================================================
   TOP NAVBAR WITH ANIMATED HORIZON BEAM
   ========================================================================= */
.docs-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(3, 3, 4, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 24px;
}

/* Animated Horizon Laser Beam */
.docs-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(247, 147, 26, 0.3) 25%, rgba(255, 214, 0, 0.7) 50%, rgba(247, 147, 26, 0.3) 75%, transparent 100%);
    animation: headerLaserBreathe 5s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes headerLaserBreathe {
    0% {
        opacity: 0.35;
        transform: scaleX(0.7);
    }
    100% {
        opacity: 0.95;
        transform: scaleX(1);
    }
}

.docs-header-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.brand-link:hover {
    opacity: 0.9;
}

.brand-logo-svg {
    height: 26px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(247, 147, 26, 0.2));
}

.brand-separator {
    color: var(--border-strong);
    font-weight: 300;
    font-size: 18px;
    opacity: 0.6;
}

.brand-docs-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.18) 0%, rgba(247, 147, 26, 0.06) 100%);
    border: 1px solid rgba(247, 147, 26, 0.35);
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.15);
}

/* Header Search Pill Button */
.search-trigger-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 20, 29, 0.7);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 320px;
    max-width: 100%;
    text-align: left;
    backdrop-filter: blur(10px);
}
.search-trigger-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(22, 28, 42, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(247, 147, 26, 0.12);
    transform: translateY(-1px);
}
.search-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--accent-orange);
    stroke-width: 2;
    flex-shrink: 0;
}
.search-placeholder {
    flex: 1;
}
.search-kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
}

/* Header Nav Links */
.header-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}
.header-nav-link {
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
}
.header-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}
.header-nav-link.active {
    color: var(--accent-orange);
    background: var(--accent-glow-subtle);
}

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

.btn-console-cta {
    background: linear-gradient(135deg, #F7931A 0%, #EA580C 100%);
    color: #FFFFFF !important;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(247, 147, 26, 0.32);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-console-cta:hover {
    transform: translateY(-1.5px) scale(1.02);
    box-shadow: 0 6px 20px rgba(247, 147, 26, 0.45);
    text-decoration: none;
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: rgba(16, 20, 29, 0.7);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.github-link:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(22, 28, 42, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-control);
}

/* =========================================================================
   MAIN 3-COLUMN LAYOUT
   ========================================================================= */
.docs-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* Left Sidebar */
.docs-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 28px 16px 40px 24px;
    border-right: 1px solid var(--border-subtle);
    background: rgba(3, 3, 4, 0.5);
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}
.docs-sidebar::-webkit-scrollbar {
    width: 5px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
}

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

.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    border-radius: var(--radius-control);
}

.sidebar-nav-list {
    list-style: none;
    margin-top: 4px;
}

.sidebar-nav-item {
    margin: 2px 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px 9px 24px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    border: 1.5px solid transparent;
}
.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
    border-radius: var(--radius-pill);
    text-decoration: none;
}

/* Enhanced Selected Tab Stadium Pill Styling */
.sidebar-nav-link.active {
    color: #FBBF24;
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.22) 0%, rgba(247, 147, 26, 0.1) 50%, rgba(247, 147, 26, 0.03) 100%);
    font-weight: 600;
    border: 1.5px solid rgba(247, 147, 26, 0.65);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 20px rgba(247, 147, 26, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 12px rgba(247, 147, 26, 0.4);
    animation: activeTabAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Floating Vertical Glowing Indicator Bar inside Stadium Pill */
.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 25%;
    bottom: 25%;
    width: 3.5px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #FFD600 0%, #F7931A 50%, #EA580C 100%);
    box-shadow: 0 0 8px #F7931A, 0 0 14px rgba(247, 147, 26, 0.8);
    animation: activeIndicatorPulse 2.4s ease-in-out infinite alternate;
}

/* Animated Shimmer Traveling Beam along Active Tab */
.sidebar-nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FFD600, #F7931A, transparent);
    animation: activeTabShimmer 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
}

@keyframes activeTabAppear {
    from {
        opacity: 0.6;
        transform: scale(0.97) translateX(-3px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes activeIndicatorPulse {
    0% {
        box-shadow: 0 0 6px #F7931A, 0 0 12px rgba(247, 147, 26, 0.5);
        opacity: 0.85;
    }
    100% {
        box-shadow: 0 0 12px #FFD600, 0 0 22px rgba(247, 147, 26, 0.9);
        opacity: 1;
    }
}

@keyframes activeTabShimmer {
    0% {
        left: -60%;
    }
    55%, 100% {
        left: 140%;
    }
}

.sidebar-nav-link.active .sidebar-tag {
    background: rgba(247, 147, 26, 0.22);
    border-color: rgba(247, 147, 26, 0.45);
    color: #FBBF24;
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

.sidebar-tag {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-tag.tag-new {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Center Content Area */
.docs-main {
    flex: 1;
    min-width: 0;
    padding: 44px 52px 84px 52px;
    display: flex;
    justify-content: center;
}

.docs-content-wrapper {
    width: 100%;
    max-width: var(--content-max-width);
}

/* Right TOC Sidebar */
.docs-toc {
    width: var(--toc-width);
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 38px 20px 48px 18px;
    border-left: 1px solid var(--border-subtle);
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}
.docs-toc::-webkit-scrollbar {
    width: 4px;
}
.docs-toc::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-left: 6px;
}

.toc-header-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Continuous guide track and navigation list */
.toc-nav-container {
    position: relative;
    padding-left: 2px;
}

.toc-list {
    list-style: none;
    position: relative;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-item {
    margin: 0;
}

.toc-link {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    font-weight: 450;
    color: var(--text-muted);
    padding: 8px 16px 8px 24px;
    border-radius: var(--radius-pill);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1.45;
    position: relative;
    border: 1.5px solid transparent;
    text-decoration: none;
    overflow: hidden;
}
.toc-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
    border-radius: var(--radius-pill);
    text-decoration: none;
}

/* Enhanced Selected Tab Stadium Pill on TOC */
.toc-link.active {
    color: #FBBF24;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.22) 0%, rgba(247, 147, 26, 0.1) 50%, rgba(247, 147, 26, 0.03) 100%);
    border: 1.5px solid rgba(247, 147, 26, 0.65);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 20px rgba(247, 147, 26, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 12px rgba(247, 147, 26, 0.4);
    animation: activeTabAppear 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Floating Vertical Glowing Indicator Bar inside Stadium Pill */
.toc-link.active::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 25%;
    bottom: 25%;
    width: 3.5px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #FFD600 0%, #F7931A 50%, #EA580C 100%);
    box-shadow: 0 0 8px #F7931A, 0 0 14px rgba(247, 147, 26, 0.8);
    animation: activeIndicatorPulse 2.4s ease-in-out infinite alternate;
}

/* Shimmer beam along top rim of active TOC item */
.toc-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FFD600, #F7931A, transparent);
    animation: activeTabShimmer 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
}

.toc-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(247, 147, 26, 0.75);
    min-width: 18px;
    flex-shrink: 0;
    transition: color 0.18s ease;
}
.toc-link:hover .toc-num,
.toc-link.active .toc-num {
    color: #FBBF24;
}

.toc-label {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    word-break: break-word;
}

.toc-link.toc-sub {
    margin-left: 14px;
    font-size: 12px;
    color: var(--text-muted);
}
.toc-link.toc-sub.active::before {
    left: 10px;
}

/* TOC Footer Quick Actions */
.toc-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-action-link {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
}
.toc-action-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
    text-decoration: none;
}
.toc-action-link:hover .toc-action-icon {
    color: var(--accent-orange);
    transform: scale(1.1);
}
.toc-action-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.toc-arrow-hint {
    width: 12px;
    height: 12px;
    margin-left: auto;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: var(--text-muted);
}
.toc-action-link:hover .toc-arrow-hint {
    opacity: 0.8;
    transform: translateX(0);
    color: var(--accent-orange);
}

/* =========================================================================
   DOCS HUB / BENTO GRID VIEW WITH AMBIENT GLOW & ANIMATED LINES
   ========================================================================= */
.docs-hub-view {
    display: block;
    width: 100%;
}

.docs-hub-hero {
    position: relative;
    margin-bottom: 50px;
    padding-top: 10px;
}

/* Ambient Radial Glow Behind Hero */
.docs-hub-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 20%;
    width: 520px;
    height: 240px;
    background: radial-gradient(ellipse, rgba(247, 147, 26, 0.16) 0%, rgba(255, 214, 0, 0.06) 40%, transparent 72%);
    filter: blur(52px);
    pointer-events: none;
    z-index: 0;
    animation: heroGlowBreathe 6s ease-in-out infinite alternate;
}

@keyframes heroGlowBreathe {
    0% {
        opacity: 0.6;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.hub-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.2) 0%, rgba(247, 147, 26, 0.05) 100%);
    border: 1px solid rgba(247, 147, 26, 0.38);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 2px 14px rgba(247, 147, 26, 0.2);
}

.hub-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-orange);
    box-shadow: 0 0 8px var(--accent-orange);
    animation: valyrixPulseDot 1.8s ease-in-out infinite;
}

@keyframes valyrixPulseDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.65);
        opacity: 0.4;
    }
}

.hub-title {
    position: relative;
    z-index: 1;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.22;
}

.hub-lead {
    position: relative;
    z-index: 1;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 740px;
}

.hub-group {
    margin-bottom: 50px;
}

/* Section Header with Flowing Animated Line */
.hub-group-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

.hub-group-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -200px;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-orange), var(--accent-gold), transparent);
    animation: animatedLineFlow 5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes animatedLineFlow {
    0% {
        left: -200px;
    }
    50%, 100% {
        left: 100%;
    }
}

.hub-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* =========================================================================
   BENTO CARDS WITH ROUNDED CORNERS & ANIMATED LASER BEAMS
   ========================================================================= */
.bento-card {
    background: linear-gradient(180deg, rgba(16, 21, 31, 0.75) 0%, rgba(10, 13, 19, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px 26px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Continuous Subtle Top Highlight */
.bento-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

/* Animated Traveling Laser Line Beam on Hover */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F7931A, #FFD600, transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.bento-card:hover {
    border-color: var(--border-hover);
    background: linear-gradient(180deg, rgba(22, 28, 42, 0.85) 0%, rgba(13, 17, 26, 0.98) 100%);
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(247, 147, 26, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.bento-card:hover::before {
    opacity: 1;
    animation: laserBeamSweep 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes laserBeamSweep {
    0% {
        left: -60%;
    }
    100% {
        left: 120%;
    }
}

.bento-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bento-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.18s ease;
}
.bento-card:hover .bento-card-title {
    color: #FBBF24;
}

.bento-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--accent-orange);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(247, 147, 26, 0.4));
    transition: transform 0.2s ease;
}
.bento-card:hover .bento-icon {
    transform: scale(1.1);
}

.bento-arrow {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease;
}
.bento-card:hover .bento-arrow {
    transform: translateX(4px);
    stroke: var(--accent-orange);
}

.bento-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* =========================================================================
   ARTICLE READING VIEW
   ========================================================================= */
.docs-article-view {
    display: none;
    width: 100%;
    animation: articleFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes articleFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumb-link {
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.breadcrumb-link:hover {
    color: var(--accent-orange);
    text-decoration: none;
}
.breadcrumb-sep {
    font-size: 10px;
    opacity: 0.6;
}
.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

.article-header {
    margin-bottom: 34px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-orange), transparent);
}

.article-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.platform-badge {
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.platform-badge.badge-spm {
    border-color: rgba(247, 147, 26, 0.35);
    color: var(--accent-orange);
    background: var(--accent-glow);
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.15);
}
.platform-badge.badge-version {
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.12);
}

.article-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}

.article-lead {
    font-size: 16.5px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Article Prose */
.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 42px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
    scroll-margin-top: 80px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.article-body h2 .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.25) 0%, rgba(247, 147, 26, 0.08) 100%);
    border: 1px solid rgba(247, 147, 26, 0.4);
    color: var(--accent-orange);
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.2);
}

.article-body h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 10px;
    scroll-margin-top: 80px;
}

.article-body p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 15px;
}
.article-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Inline Code */
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FDBA74;
    padding: 2px 7px;
    border-radius: 6px;
}

/* Code Blocks with Rounded Corners & Tabs */
.code-container {
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-box);
    margin: 22px 0 26px 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.code-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(247, 147, 26, 0.4), transparent);
    pointer-events: none;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 21, 31, 0.85);
    border-bottom: 1px solid var(--border-subtle);
    padding: 4px 14px;
    min-height: 42px;
}

.code-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.code-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.code-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.code-tab-btn.active {
    color: var(--accent-orange);
    background: var(--accent-glow);
    font-weight: 600;
    border: 1px solid rgba(247, 147, 26, 0.3);
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.12);
}

.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.code-copy-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
    transform: scale(1.03);
}
.code-copy-btn.copied {
    color: var(--accent-green);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.copy-icon {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

pre {
    padding: 20px 22px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #E2E8F0;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}
pre::-webkit-scrollbar {
    height: 5px;
}
pre::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
}
pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Syntax Highlighting Tokens */
.tok-kw { color: #F472B6; font-weight: 600; }
.tok-fn { color: #60A5FA; }
.tok-str { color: #34D399; }
.tok-num { color: #FBBF24; }
.tok-com { color: #64748B; font-style: italic; }
.tok-type { color: #A78BFA; }
.tok-prop { color: #38BDF8; }

/* Callout Alerts */
.callout {
    border-radius: var(--radius-box);
    padding: 18px 22px;
    margin: 24px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.callout-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.callout-body {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}
.callout-body strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}
.callout-info {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    color: #E0F2FE;
}
.callout-info .callout-icon {
    stroke: var(--accent-blue);
}
.callout-tip {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    color: #DCFCE7;
}
.callout-tip .callout-icon {
    stroke: var(--accent-green);
}
.callout-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
    color: #FEF3C7;
}
.callout-warning .callout-icon {
    stroke: var(--accent-amber);
}

/* Article Navigation Bottom Cards */
.article-nav-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.article-nav-card {
    background: linear-gradient(180deg, rgba(16, 21, 31, 0.75) 0%, rgba(10, 13, 19, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-box);
    padding: 18px 22px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.article-nav-card:hover {
    border-color: var(--border-hover);
    background: linear-gradient(180deg, rgba(22, 28, 42, 0.85) 0%, rgba(13, 17, 26, 0.98) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 18px rgba(247, 147, 26, 0.12);
    text-decoration: none;
}
.article-nav-card.next {
    text-align: right;
}
.article-nav-card-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.article-nav-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.15s ease;
}
.article-nav-card:hover .article-nav-card-title {
    color: var(--accent-orange);
}

/* =========================================================================
   SEARCH MODAL WITH ROUNDED CORNERS & GLASSMORPHISM (Image 1 Refinement)
   ========================================================================= */
.search-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 3, 4, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 14vh;
}
.search-modal-backdrop.open {
    display: flex;
    animation: backdropFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes backdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-modal {
    width: 620px;
    max-width: 92vw;
    background: linear-gradient(180deg, rgba(17, 22, 33, 0.95) 0%, rgba(9, 12, 18, 0.98) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-modal);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85), 0 0 32px rgba(247, 147, 26, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow: hidden;
    position: relative;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glowing Top Accent on Search Modal */
.search-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F7931A, #FFD600, transparent);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(14, 18, 27, 0.6);
}

.search-field-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-control);
    padding: 8px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-field-pill:focus-within {
    border-color: rgba(247, 147, 26, 0.6);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.16), 0 0 18px rgba(247, 147, 26, 0.12);
}

.search-modal-input {
    flex: 1;
    background: none;
    border: none;
    outline: none !important;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
}
.search-modal-input::placeholder {
    color: var(--text-muted);
}

.search-modal-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.search-modal-close-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.1);
}

.search-results-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 10px;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: var(--border-subtle) transparent;
}
.search-results-list::-webkit-scrollbar {
    width: 5px;
}
.search-results-list::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-control);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 2px 0;
    border: 1px solid transparent;
}
.search-result-item:hover, .search-result-item.selected {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.12) 0%, rgba(247, 147, 26, 0.03) 100%);
    border: 1px solid rgba(247, 147, 26, 0.3);
    transform: translateX(4px);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.search-result-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-result-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.15s ease;
}
.search-result-item:hover .search-result-title, .search-result-item.selected .search-result-title {
    color: #FBBF24;
}

.search-result-snippet {
    font-size: 12.5px;
    color: var(--text-muted);
}

.search-result-category {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}
.search-result-item.selected .search-result-category {
    background: var(--accent-glow);
    color: var(--accent-orange);
    border-color: rgba(247, 147, 26, 0.35);
}

.search-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(8, 11, 17, 0.9);
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

.search-keyboard-hints {
    display: flex;
    gap: 14px;
}
.search-keyboard-hints kbd {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

/* =========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================= */
@media (max-width: 1200px) {
    .docs-toc {
        display: none;
    }
    .docs-main {
        padding: 36px 36px 64px 36px;
    }
}

@media (max-width: 860px) {
    .search-trigger-btn {
        width: 180px;
    }
    .search-kbd {
        display: none;
    }
    .hub-grid {
        grid-template-columns: 1fr;
    }
    .article-nav-cards {
        grid-template-columns: 1fr;
    }
    .header-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .docs-sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        width: 290px;
        z-index: 900;
        background: rgba(10, 13, 20, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 12px 0 36px rgba(0, 0, 0, 0.7);
        transition: left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .docs-sidebar.mobile-open {
        left: 0;
    }
    .docs-main {
        padding: 26px 20px 60px 20px;
    }
    .hub-title {
        font-size: 28px;
    }
    .article-title {
        font-size: 26px;
    }
}
