@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=Manrope:wght@500;700;800&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&display=swap');

body {
    font-family: 'Newsreader', Georgia, serif;
    background: #f9f9f9;
    color: #2d3434;
    line-height: 1.6;
}
code, pre { font-family: 'IBM Plex Mono', monospace; }
:root {
    --vyasa-paper: #f9f9f9;
    --vyasa-paper-low: #f2f4f3;
    --vyasa-paper-raised: #ffffff;
    --vyasa-paper-accent: #dee4e3;
    --vyasa-ink: #2d3434;
    --vyasa-ink-soft: #5a6060;
    --vyasa-primary: #45655b;
    --vyasa-primary-dim: #39584f;
    --vyasa-outline-ghost: rgba(90, 96, 96, 0.2);
    --vyasa-code-bg: #f6f8fa;
    --vyasa-code-fg: #24292f;
    --vyasa-code-border: rgba(45, 52, 52, 0.12);
    --vyasa-code-highlight-bg: rgba(9, 105, 218, 0.12);
    --vyasa-code-highlight-accent: #0969da;
    --vyasa-code-comment: #6e7781;
    --vyasa-code-keyword: #cf222e;
    --vyasa-code-string: #0a3069;
    --vyasa-code-title: #8250df;
    --vyasa-code-number: #0550ae;
}
.dark {
    --vyasa-paper: #18201e;
    --vyasa-paper-low: #22302c;
    --vyasa-paper-raised: #243632;
    --vyasa-paper-accent: #31433e;
    --vyasa-ink: #edf2f1;
    --vyasa-ink-soft: #b5c3bf;
    --vyasa-outline-ghost: rgba(181, 195, 191, 0.2);
}

body, p, li, blockquote { color: var(--vyasa-ink); }
a { color: var(--vyasa-primary); transition: color 300ms ease-out, background-color 300ms ease-out, opacity 300ms ease-out; }
a:hover { color: var(--vyasa-primary-dim); }
html, body, #page-container { background: var(--vyasa-paper); }
.dark body, .dark #page-container { background: var(--vyasa-paper); }
h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', 'Inter', sans-serif;
    color: var(--vyasa-ink);
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(3rem, 5vw, 3.5rem); line-height: 0.96; }
.uk-text-meta, kbd, .toc-link, summary, button, .vyasa-caption {
    font-family: 'Inter', sans-serif;
}

.vyasa-navbar-card,
.vyasa-sidebar,
.vyasa-sidebar-card,
.vyasa-sidebar-toggle,
.vyasa-sidebar-body,
.vyasa-mobile-panel,
.vyasa-mobile-panel-header,
.vyasa-mobile-panel-body,
.vyasa-footer-card,
.toc-link,
.tab-button,
button,
input,
select,
textarea,
label,
summary,
kbd {
    font-family: 'Inter', sans-serif;
}

.vyasa-sidebar-body a,
.vyasa-sidebar-body li,
.vyasa-sidebar-body span,
.vyasa-sidebar-body div,
.vyasa-sidebar-body input::placeholder,
.vyasa-mobile-panel-body a,
.vyasa-mobile-panel-body li,
.vyasa-mobile-panel-body span,
.vyasa-mobile-panel-body div {
    font-family: 'Inter', sans-serif;
}

#main-content,
#main-content p,
#main-content li,
#main-content blockquote,
#main-content .sidenote {
    font-family: 'Newsreader', Georgia, serif;
}

#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5,
#main-content h6 {
    font-family: 'Manrope', 'Inter', sans-serif;
}

.vyasa-navbar-shell,
.vyasa-footer-shell,
.vyasa-content-grid {
    position: relative;
}

.vyasa-navbar-card {
    background: linear-gradient(135deg, var(--vyasa-primary), var(--vyasa-primary-dim)) !important;
    color: #f2f4f3 !important;
    border-radius: 0.9rem;
    box-shadow: 0 24px 40px -32px rgba(45, 52, 52, 0.32);
}

.vyasa-navbar-card a,
.vyasa-navbar-card button,
.vyasa-navbar-card summary,
.vyasa-navbar-card [uk-icon] {
    color: #f2f4f3 !important;
}

.vyasa-navbar-card button:hover,
.vyasa-navbar-card summary:hover {
    background: rgba(242, 244, 243, 0.14) !important;
}

.vyasa-sidebar-body,
.vyasa-sidebar-toggle,
.vyasa-footer-card,
.vyasa-mobile-panel-header,
.vyasa-mobile-panel-body {
    background: var(--vyasa-paper-low) !important;
    color: var(--vyasa-ink) !important;
    border-color: var(--vyasa-outline-ghost) !important;
    box-shadow: 0 28px 48px -44px rgba(45, 52, 52, 0.28);
}

.vyasa-mobile-panel,
.vyasa-mobile-panel-header,
.vyasa-mobile-panel-body {
    background: color-mix(in srgb, var(--vyasa-paper) 84%, transparent) !important;
    backdrop-filter: blur(12px);
}

.vyasa-sidebar-toggle,
.vyasa-sidebar-body {
    border-radius: 1rem !important;
}

.vyasa-sidebar-toggle {
    margin-bottom: 0.8rem !important;
}

.vyasa-main-shell {
    background: transparent;
    padding-top: 2.5rem !important;
}

.vyasa-main-shell > *:not(.vyasa-table-scroll):not(.mermaid-container):not(.d2-container):not(.code-block) {
    max-width: 46rem;
}

.vyasa-main-shell > h1,
.vyasa-main-shell > h2,
.vyasa-main-shell > h3,
.vyasa-main-shell > p,
.vyasa-main-shell > ul,
.vyasa-main-shell > ol,
.vyasa-main-shell > blockquote,
.vyasa-main-shell > .vyasa-prev-next {
    margin-left: clamp(0rem, 3vw, 2.25rem);
}

.vyasa-footer-card {
    background: var(--vyasa-paper-low) !important;
    color: var(--vyasa-ink) !important;
    border-radius: 1rem;
}

.chat-row-block { padding: 14px 0; }
.chat-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.folder-chevron {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid rgb(148 163 184);
    border-bottom: 2px solid rgb(148 163 184);
    transform: rotate(-45deg);
    transition: transform 0.2s;
}

details.is-open > summary .folder-chevron { transform: rotate(45deg); }
details { border: none !important; box-shadow: none !important; }
h1, h2, h3, h4, h5, h6 { scroll-margin-top: 7rem; }

* { scrollbar-width: thin; scrollbar-color: rgb(203 213 225) transparent; }
*::-webkit-scrollbar { width: 3px; height: 3px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background-color: rgb(203 213 225); border-radius: 2px; }
*::-webkit-scrollbar-thumb:hover { background-color: rgb(148 163 184); }
.dark *::-webkit-scrollbar-thumb { background-color: rgb(71 85 105); }
.dark *::-webkit-scrollbar-thumb:hover { background-color: rgb(100 116 139); }
.dark * { scrollbar-color: rgb(71 85 105) transparent; }

.sidebar-highlight { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35); transition: box-shadow 10s ease, background-color 10s ease; }
.sidebar-highlight.fade-out { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0); }

body.pdf-focus { overflow: hidden; }
body.pdf-focus #site-navbar,
body.pdf-focus #site-footer,
body.pdf-focus #posts-sidebar,
body.pdf-focus #toc-sidebar,
body.pdf-focus #mobile-posts-panel,
body.pdf-focus #mobile-toc-panel { display: none !important; }
body.pdf-focus #content-with-sidebars { max-width: none !important; width: 100vw !important; padding: 0 !important; margin: 0 !important; gap: 0 !important; }
body.pdf-focus #main-content { padding: 1rem !important; }
body.pdf-focus .pdf-viewer { height: calc(100vh - 6rem) !important; }

body.iframe-fullscreen-open { overflow: hidden; }
.iframe-fullscreen-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(2, 6, 23, 0.85); display: flex; flex-direction: column; }
.iframe-fullscreen-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; color: #e2e8f0; font-size: 0.9rem; background: rgba(15, 23, 42, 0.9); border-bottom: 1px solid rgba(148, 163, 184, 0.3); }
.iframe-fullscreen-body { flex: 1; padding: 0.75rem; }
.iframe-fullscreen-frame { width: 100%; height: 100%; border: 0; border-radius: 0.5rem; background: #0f172a; }

.layout-fluid {
    --layout-breakpoint: 1280px;
    --layout-blend: 240px;
    max-width: calc(100% - (100% - var(--layout-max-width)) * clamp(0, (100vw - var(--layout-breakpoint)) / var(--layout-blend), 1)) !important;
}

.tabs-container { margin: 2.5rem 0; border: none; border-radius: 1rem; overflow: visible; background: var(--vyasa-paper-low); box-shadow: 0 28px 48px -44px rgba(45, 52, 52, 0.28); }
.tabs-header { display: flex; background: transparent; border-bottom: none; gap: 0.35rem; padding: 0.4rem; }
.tab-button { flex: 1; padding: 0.9rem 1.35rem; background: transparent; border: none; cursor: pointer; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--vyasa-ink-soft); transition: all 300ms ease-out; position: relative; border-radius: 0.8rem; }
.tab-button:hover:not(.active) { background: rgba(69, 101, 91, 0.08); color: var(--vyasa-ink); }
.tab-button.active { color: var(--vyasa-primary); background: rgba(199, 234, 222, 0.45); font-weight: 700; }
.tabs-content { background: transparent; position: relative; overflow: visible; }
.tab-panel { padding: 1rem; animation: fadeIn 0.2s ease-in; position: absolute; top: 0; left: 0; right: 0; opacity: 0; visibility: hidden; pointer-events: none; overflow: visible; }
.tab-panel.active { position: relative; opacity: 1; visibility: visible; pointer-events: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tab-panel > *:first-child { margin-top: 0 !important; }
.tab-panel > *:last-child { margin-bottom: 0 !important; }
.tab-panel pre { border-radius: 0.375rem; font-size: 0.875rem; }
.tab-panel code { font-family: 'IBM Plex Mono', monospace; }

.vyasa-callout { --vyasa-callout-accent: var(--vyasa-primary); background: var(--vyasa-paper-low); border: 1px solid color-mix(in srgb, var(--vyasa-callout-accent) 16%, transparent); box-shadow: 0 22px 34px -30px rgba(45, 52, 52, 0.24); }
.dark .vyasa-callout { background: var(--vyasa-paper-low); }
.vyasa-callout-summary { list-style: none; }
.vyasa-callout-summary::-webkit-details-marker { display: none; }
.vyasa-callout-summary .vyasa-callout-head { cursor: pointer; }
.vyasa-callout-head-with-body { margin-bottom: 0.75rem; }
.vyasa-callout-icon { color: var(--vyasa-callout-accent); display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; flex: 0 0 1.25rem; overflow: visible; }
.vyasa-callout-icon svg, .vyasa-callout-icon uk-icon { width: 1.125rem; height: 1.125rem; overflow: visible; stroke-linecap: round; stroke-linejoin: round; }
.vyasa-callout-chevron { margin-left: auto; width: 0.55rem; height: 0.55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 160ms ease; opacity: 0.65; }
details[open] > .vyasa-callout-summary .vyasa-callout-chevron { transform: rotate(45deg); }
.vyasa-callout-label { color: var(--vyasa-ink); font-family: 'Inter', sans-serif; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.dark .vyasa-callout-label { color: var(--vyasa-ink); }
.vyasa-callout-body .vyasa-callout { position: relative; margin-top: 1rem; margin-bottom: 0; margin-left: 1.25rem; }
.vyasa-callout-body .vyasa-callout::before { content: ""; position: absolute; left: -0.875rem; top: 0.55rem; bottom: -0.25rem; width: 2px; border-radius: 999px; background: linear-gradient(180deg, color-mix(in srgb, var(--vyasa-callout-accent) 35%, transparent), color-mix(in srgb, var(--vyasa-callout-accent) 10%, transparent)); opacity: 0.8; }
.vyasa-callout-body .vyasa-callout:last-child::before { bottom: 0.75rem; }
.vyasa-callout-body > *:first-child { margin-top: 0 !important; }
.vyasa-callout-body > *:last-child { margin-bottom: 0 !important; }
.vyasa-callout-note, .vyasa-callout-info, .vyasa-callout-abstract, .vyasa-callout-tip, .vyasa-callout-success, .vyasa-callout-todo, .vyasa-callout-warning, .vyasa-callout-important, .vyasa-callout-question, .vyasa-callout-failure, .vyasa-callout-danger, .vyasa-callout-bug, .vyasa-callout-example, .vyasa-callout-quote { --vyasa-callout-accent: var(--vyasa-primary); }
.vyasa-code-lines { display: block; white-space: normal !important; }
.vyasa-code-line { display: block; white-space: pre; margin: 0 -1rem; padding: 0 1rem; }
.code-block .vyasa-code-line-highlight { background: var(--vyasa-code-highlight-bg); box-shadow: inset 6px 0 0 var(--vyasa-code-highlight-accent); }
.vyasa-heading-permalink { opacity: 0; transition: opacity 120ms ease; }
.vyasa-heading-text:hover + .vyasa-heading-permalink, .vyasa-heading-permalink:hover, .vyasa-heading-permalink:focus { opacity: 1; }
.code-block pre, .code-block pre code, pre code.hljs { background: var(--vyasa-code-bg); color: var(--vyasa-code-fg); }
.code-block { margin: 1.4rem 0 1.8rem; }
.code-block pre { border: 1px solid var(--vyasa-code-border); border-radius: 1rem; padding: 1.15rem 1.3rem !important; box-shadow: 0 16px 24px -22px rgba(45, 52, 52, 0.18); }
.code-block pre code, pre code.hljs { font-size: 0.95rem; line-height: 1.55; }
.code-block [class*="copy"], .code-copy-button { font-family: 'Inter', sans-serif; }
.hljs-comment, .hljs-quote { color: var(--vyasa-code-comment); }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: var(--vyasa-code-keyword); }
.hljs-string, .hljs-doctag, .hljs-regexp { color: var(--vyasa-code-string); }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-attribute { color: var(--vyasa-code-title); }
.hljs-number, .hljs-symbol, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-built_in { color: var(--vyasa-code-number); }
.vyasa-prev-next { display:flex; justify-content:space-between; gap:1rem; margin-top:3.5rem; padding-top:0.5rem; border-top:none; }
.vyasa-prev-link, .vyasa-next-link { max-width:48%; text-decoration:none; color:var(--vyasa-primary); font-weight:600; font-family: 'Inter', sans-serif; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.vyasa-next-link { text-align:right; margin-left:auto; }
.vyasa-prev-link:hover, .vyasa-next-link:hover { text-decoration:underline; }

.vyasa-table-scroll { width: 100%; max-width: 100%; position: static; left: auto; transform: none; margin: 1.5rem 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable both-edges; box-shadow: none; transition: box-shadow 160ms ease; }
.vyasa-table-scroll.vyasa-table-breakout { width: min(var(--vyasa-breakout-width, 80vw), 80vw); max-width: 80vw; position: relative; left: 50%; transform: translateX(-50%); }
.vyasa-table-scroll.has-right-overflow { box-shadow: inset -18px 0 16px -14px rgba(15, 23, 42, 0.32); }
.vyasa-table-scroll.has-left-overflow { box-shadow: inset 18px 0 16px -14px rgba(15, 23, 42, 0.32); }
.vyasa-table-scroll.has-left-overflow.has-right-overflow { box-shadow: inset 18px 0 16px -14px rgba(15, 23, 42, 0.32), inset -18px 0 16px -14px rgba(15, 23, 42, 0.32); }
.dark .vyasa-table-scroll.has-right-overflow { box-shadow: inset -18px 0 16px -14px rgba(2, 6, 23, 0.62); }
.dark .vyasa-table-scroll.has-left-overflow { box-shadow: inset 18px 0 16px -14px rgba(2, 6, 23, 0.62); }
.dark .vyasa-table-scroll.has-left-overflow.has-right-overflow { box-shadow: inset 18px 0 16px -14px rgba(2, 6, 23, 0.62), inset -18px 0 16px -14px rgba(2, 6, 23, 0.62); }
.vyasa-table-scroll > table, .vyasa-table-scroll > .uk-table { width: max-content !important; min-width: 0; table-layout: auto; margin: 0 auto; background: var(--vyasa-paper-low); border-radius: 1rem; overflow: hidden; }
.uk-table-striped tbody tr:nth-of-type(odd) { background-color: rgba(69, 101, 91, 0.04); }
.uk-table-striped tbody tr:hover { background-color: rgba(69, 101, 91, 0.08); }
.uk-table thead { border-bottom: none; }
.uk-table thead th { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--vyasa-ink-soft); font-family: 'Inter', sans-serif; }
.uk-table th:not(:last-child), .uk-table td:not(:last-child) { border-right: none; }
.uk-table td, .uk-table th { border-bottom-color: var(--vyasa-outline-ghost); }
.toc-link { color: var(--vyasa-ink-soft) !important; border-radius: 999px; padding-left: 0.95rem !important; transition: all 300ms ease-out; }
.toc-link:hover { color: #f9f9f9 !important; background: #2d3434 !important; }
.vyasa-sidebar-body .text-blue-600, .vyasa-sidebar-body .hover\:text-blue-600:hover, .vyasa-sidebar-body .text-blue-700 { color: var(--vyasa-primary) !important; }
.vyasa-sidebar-body [class*="bg-blue-"], .vyasa-sidebar-body .sidebar-highlight {
    background: #41514d !important;
    box-shadow: none !important;
    border-radius: 0.45rem !important;
}
.vyasa-sidebar-body [class*="bg-blue-"] a,
.vyasa-sidebar-body .sidebar-highlight a,
.vyasa-sidebar-body [class*="bg-blue-"] span,
.vyasa-sidebar-body .sidebar-highlight span {
    color: #f9f9f9 !important;
}
.vyasa-sidebar-body .toc-link.font-semibold,
.vyasa-sidebar-body .toc-link.font-semibold span,
.vyasa-sidebar-body .toc-link.font-semibold [uk-icon] {
    color: #f9f9f9 !important;
}
.vyasa-sidebar-body a:hover,
.vyasa-sidebar-body .post-search-link:hover,
.vyasa-sidebar-body .toc-link:hover {
    background: #41514d !important;
    color: #f9f9f9 !important;
    border-radius: 0.45rem !important;
}
.vyasa-sidebar-body a:hover span,
.vyasa-sidebar-body .post-search-link:hover span,
.vyasa-sidebar-body .toc-link:hover span,
.vyasa-sidebar-body a:hover [uk-icon],
.vyasa-sidebar-body .post-search-link:hover [uk-icon] {
    color: #f9f9f9 !important;
}
.posts-search-block { background: transparent !important; margin-bottom: 1rem; }
.posts-search-label { color: var(--vyasa-ink-soft) !important; }
.posts-search-input {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 2px solid var(--vyasa-outline-ghost) !important;
    border-radius: 0 !important;
    padding: 0.9rem 2.2rem 0.8rem 0 !important;
    box-shadow: none !important;
}
.posts-search-input:focus { border-bottom-color: var(--vyasa-primary) !important; box-shadow: none !important; }
.posts-search-input::placeholder { color: var(--vyasa-ink-soft); }
.posts-search-clear-button { background: transparent !important; color: var(--vyasa-ink-soft) !important; }
.posts-search-clear-button:hover { background: rgba(199, 234, 222, 0.35) !important; color: var(--vyasa-primary) !important; }
.vyasa-spacer-rule { background: transparent !important; }
