@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Hedvig+Letters+Sans&family=Source+Code+Pro:wght@400;500;600&display=swap');

:root {
    --bg-primary: rgb(15, 15, 16);
    --bg-secondary: rgb(22, 22, 24);
    --bg-tertiary: rgb(34 37 59);
    --bg-hover: rgba(234, 244, 250, 0.1);
    --bg-code: rgba(234, 244, 250, 0.07);
    --bg-card: rgba(234, 244, 250, 0.07);
    --bg-card-hover: rgba(234, 244, 250, 0.09);
    --bg-subtle: rgba(255, 255, 255, 0.04);
    --bg-overlay: rgba(15, 15, 16, 0.94);
    --text-primary: rgb(234, 238, 246);
    --text-secondary: rgb(233 237 245 / 87%);
    --text-muted: rgb(255 255 255 / 59%);
    --text-white-73: rgba(255, 255, 255, 0.73);
    --text-white-33: rgba(255, 255, 255, 0.33);
    --accent-blue: rgb(100, 125, 237);
    --accent-purple: hsl(271, 78%, 64%);
    --accent-blue-pale: rgb(156, 174, 255);
    --border-color: rgba(234, 244, 250, 0.14);
    --border-subtle: rgba(234, 244, 250, 0.06);
    --border-hover: rgba(234, 244, 250, 0.2);
    --border-strong: rgba(234, 244, 250, 0.32);
    --gradient-start: rgb(4, 12, 36);
    --gradient-end: rgb(32, 7, 38);
    --button-bg-deep: rgb(22, 32, 77);
    --sidebar-width: 280px;
    --toc-width: 240px;
    --content-max: 768px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: 'Inter', 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-purple);
}

.docs-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 64px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background-color: transparent;
    border-bottom: 1px solid var(--bg-hover);
    box-shadow: rgba(29, 30, 32, 0.08) 0 0 16px 0, rgba(29, 30, 32, 0.04) 0 0 12px 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 100%;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 20px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-logo img {
    height: 42px;
    width: auto;
    position: relative;
    display: block;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-link {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

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

.navbar-link--active {
    color: var(--text-primary);
    background: rgba(234, 244, 250, 0.05);
}

.docs-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    padding-top: 48px;
}

.docs-bg-gradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.docs-bg-gradient::before,
.docs-bg-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
}

.docs-bg-gradient::before {
    background: radial-gradient(100% 100% at 100% 0%, var(--gradient-end) 0%, rgba(32, 1, 41, 0) 100%);
}

.docs-bg-gradient::after {
    background: radial-gradient(50% 50% at 50% 50%, var(--gradient-start) 0%, rgba(1, 9, 36, 0) 100%);
}

.docs-sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 66px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 16px;
}

.sidebar-logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.sidebar-logo span {
    color: var(--text-primary);
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: rgba(234, 244, 250, 0.07);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent-blue);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    max-height: 340px;
    overflow-y: auto;
    display: none;
    z-index: 200;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s ease;
    text-decoration: none;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-category {
    flex-shrink: 0;
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--accent-blue);
    background: rgba(100, 125, 237, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.search-result-title {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item:hover .search-result-title {
    color: var(--text-primary);
}

.search-no-results {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.nav-category {
    margin-bottom: 8px;
}

.nav-category-title {
    padding: 6px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-primary);
}

.nav-link {
    display: block;
    padding: 6px 20px 6px 28px;
    font-size: 13.5px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.1s ease;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    background: var(--bg-subtle);
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-footer a {
    color: var(--text-muted);
}

.sidebar-footer a:hover {
    color: var(--accent-blue);
}

.mobile-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 150;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    z-index: 999;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 90;
}

.docs-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 48px 287px 50px 80px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

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

.article-meta {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.article-meta h1 {
    font-family: 'Hedvig Letters Sans', 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.article-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text-primary);
}

.article-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text-primary);
}

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

.article-body ul,
.article-body ol {
    margin: 0 0 16px 24px;
    color: var(--text-secondary);
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.article-body li p {
    margin-bottom: 4px;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body code {
    font-family: 'Source Code Pro', 'Geist Mono', 'SF Mono', monospace;
    background: rgba(234, 244, 250, 0.09);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent-purple);
}

.article-body pre {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 3px solid var(--accent-blue);
    padding: 12px 16px;
    margin: 0 0 16px;
    background: var(--bg-card);
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.article-body thead th {
    background: var(--bg-tertiary);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-hover);
}

.article-body tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.article-body tbody tr:hover {
    background: var(--bg-hover);
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 8px 0 16px;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 32px 0;
}

.code-block-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.code-block-wrapper pre {
    margin-bottom: 0;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

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

.code-copy-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.code-copy-btn.copied {
    color: var(--accent-blue);
}

.docs-cta-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.docs-cta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-cta-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.docs-cta-item p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.docs-cta-item a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-cta-item a:hover {
    color: var(--text-primary);
}

.docs-pagination {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.pagination-link {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
    max-width: 48%;
}

.pagination-link:hover {
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

.pagination-link--next {
    margin-left: auto;
    text-align: right;
}

.pagination-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pagination-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-blue);
}

.docs-toc {
    width: var(--toc-width);
    position: fixed;
    right: 24px;
    top: 96px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 1;
}

.docs-toc::-webkit-scrollbar {
    display: none;
}

.toc-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.toc-link {
    display: block;
    padding: 4px 0 4px 12px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid var(--border-color);
    transition: all 0.1s ease;
    line-height: 1.4;
    margin-bottom: 2px;
}

.toc-link:hover {
    color: var(--text-secondary);
}

.toc-link.active {
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
}

.toc-link.toc-h3 {
    padding-left: 24px;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .docs-toc {
        display: none;
    }

    .docs-main {
        padding-right: 32px;
    }
}

@media (max-width: 1079px) {
    .docs-toc {
        display: none;
    }
}

@media (max-width: 809px) {
    .navbar-links {
        display: none;
    }

    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: flex;
    }

    .navbar-left {
        padding-left: 60px;
    }

    .mobile-overlay.active {
        display: block;
    }

    .docs-main {
        margin-left: 0;
        padding: 64px 20px 60px;
    }

    .docs-toc {
        display: none;
    }

    .article-meta h1 {
        font-size: 24px;
    }

    .article-body h2 {
        font-size: 20px;
    }

    .docs-pagination {
        flex-direction: column;
    }

    .pagination-link {
        max-width: 100%;
    }

    .pagination-link--next {
        margin-left: 0;
    }
}

.landing-hero {
    text-align: center;
    padding: 80px 0 48px;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    padding-left: 7px;
    background: rgba(234, 244, 250, 0.07);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.landing-badge-new {
    background: var(--accent-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.landing-hero h1 {
    font-family: 'Hedvig Letters Sans', 'Inter', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.landing-hero p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 600px;
    margin: 0 auto 32px;
}

.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.landing-cta:hover {
    background: var(--button-bg-deep);
    color: #fff;
}

.landing-section-title {
    font-family: 'Hedvig Letters Sans', 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.landing-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 56px;
}

.landing-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.landing-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.landing-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.landing-articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 56px;
}

.landing-article-link {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.landing-article-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.landing-article-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.landing-article-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.landing-footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.landing-footer a {
    color: var(--text-secondary);
}

@media (max-width: 809px) {
    .landing-hero h1 {
        font-size: 28px;
    }

    .landing-categories,
    .landing-articles {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding: 40px 0 32px;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}