/* ═══════════════════════════════════════════════════════════════
   Trellar Docs — Getting Started
   Relies on shared tokens (--bg-page, --text-primary, etc.) and
   navbar/footer styles already defined in landing_page.css.
   ═══════════════════════════════════════════════════════════════ */

body { background: var(--bg-page); }

.nav-link.active { color: var(--text-primary); }
.nav-link.active::after { width: 100%; }

/* ─── Header ─── */
.docs-header {
    padding: 136px 24px 0;
    /* transparent so the fixed living-mesh background shows around the block */
    background: transparent;
    text-align: center;
}

/* Header text sits on the same frosted white block as the content below */
.docs-header-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 44px 40px 40px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 48px rgba(30, 27, 75, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.docs-header-inner > * { max-width: 720px; margin-left: auto; margin-right: auto; }

.docs-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
}

.docs-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.docs-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Layout ─── */
.docs-main { padding: 40px 24px 104px; }

html { scroll-behavior: smooth; }

.docs-layout {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 56px;
    align-items: start;
}

/* Content sits on a frosted white block so text stays readable over the
   living-mesh background (same card language as the landing page). */
.docs-inner {
    display: flex;
    flex-direction: column;
    gap: 72px;
    min-width: 0;
    padding: 44px 44px 48px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 48px rgba(30, 27, 75, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ─── Table of contents ─── */
.docs-toc {
    position: sticky;
    top: 96px;
    align-self: start;
}

/* "On this page" list on its own frosted block (desktop) */
.docs-toc-nav {
    padding: 18px 16px 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(30, 27, 75, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.docs-toc-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.docs-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid var(--border-light);
}

.docs-toc-link {
    display: block;
    padding: 6px 0 6px 16px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: var(--transition);
}

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

.docs-toc-link.active {
    color: var(--accent-purple);
    border-left-color: var(--accent-purple);
    font-weight: 600;
}

/* ─── Section / tab panels ─── */
.docs-panel { display: none; }
.docs-panel.is-active { display: block; }

.docs-section-head { margin-bottom: 28px; }

.docs-section-head h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.docs-section-intro {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.docs-inline-link {
    color: var(--accent-purple);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(124,58,237,0.3);
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.docs-inline-link:hover { opacity: 0.75; }

.docs-ordered-list {
    list-style: none;
    counter-reset: docs-step-counter;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.docs-ordered-list li {
    counter-increment: docs-step-counter;
    position: relative;
    padding-left: 32px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.docs-ordered-list li::before {
    content: counter(docs-step-counter);
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(124,58,237,0.08);
    color: var(--accent-purple);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
}

.docs-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(249,115,22,0.06);
    border: 1px solid rgba(249,115,22,0.18);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.docs-note svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: var(--accent-orange);
    margin-top: 1px;
}

.docs-subhead {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.docs-subhead:first-child { margin-top: 0; }

.docs-body-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.docs-section-body code,
.docs-section-intro code,
.docs-body-text code,
.docs-fine-print code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: rgba(30,27,75,0.06);
    border: 1px solid rgba(30,27,75,0.1);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--text-primary);
}

.docs-fine-print {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: -8px 0 24px;
}

/* Link out to the package page (PyPI / npm), placed under the install command */
.docs-pkg-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    padding: 7px 14px 7px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.docs-pkg-link:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.docs-pkg-link:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* ─── Code blocks (Dracula theme) ─── */
.code-block {
    position: relative;
    min-width: 0; /* allow shrinking inside flex/grid parents */
    background: #282a36;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 18px 52px 18px 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.65;
    color: #f8f8f2;
    white-space: pre;
}

.code-block-lg pre { padding: 22px 52px 22px 22px; }

/* Syntax token colors — Dracula palette */
.tok-comment { color: #6272a4; font-style: italic; }
.tok-string { color: #f1fa8c; }
.tok-number,
.tok-builtin,
.tok-constant { color: #bd93f9; }
.tok-keyword { color: #ff79c6; }
.tok-funcname,
.tok-decorator,
.tok-call { color: #50fa7b; }
.tok-class { color: #8be9fd; font-style: italic; }
.tok-variable { color: #ffb86c; }

.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 7px;
    cursor: pointer;
    transition: var(--transition);
}

.code-copy-btn svg {
    width: 15px;
    height: 15px;
    stroke: #cfc9ec;
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.16);
}

.code-copy-btn.copied {
    background: rgba(22,163,74,0.25);
    border-color: rgba(22,163,74,0.4);
}

.code-copy-btn.copied svg { stroke: #4ade80; }

/* ─── Response field list ─── */
.docs-field-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 24px;
}

.docs-field {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
}

.docs-field-head {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 168px;
}

.docs-field-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.docs-field-type {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--accent-purple);
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.2);
    border-radius: 100px;
    padding: 2px 9px;
    white-space: nowrap;
}

.docs-field-desc {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.docs-field-desc code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: rgba(30,27,75,0.06);
    border: 1px solid rgba(30,27,75,0.1);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--text-primary);
}

.docs-field-alert {
    background: rgba(249,115,22,0.05);
    border-color: rgba(249,115,22,0.22);
}

.docs-field-alert .docs-field-type {
    color: var(--accent-orange);
    background: rgba(249,115,22,0.1);
    border-color: rgba(249,115,22,0.28);
}

@media (max-width: 560px) {
    .docs-field { flex-direction: column; gap: 8px; }
    .docs-field-head { flex-direction: row; align-items: center; min-width: 0; }
}

/* ─── Pattern grid (Gate / Observe) ─── */
.docs-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.docs-pattern-card {
    min-width: 0; /* allow grid item to shrink below content's intrinsic width */
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.docs-pattern-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.docs-pattern-card p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

.docs-pattern-card .code-block code { font-size: 0.76rem; }

/* ─── Flow diagrams (Gate / Observe) ─── */
.flow-diagram {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 6px;
    margin-bottom: 10px;
    background: var(--bg-section-alt);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.flow-diagram::-webkit-scrollbar { display: none; }

.flow-node {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    padding: 6px 8px;
    white-space: nowrap;
}

.flow-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
}

.flow-node-gate {
    color: var(--accent-orange);
    background: rgba(249,115,22,0.08);
    border-color: rgba(249,115,22,0.3);
}

.flow-node-observe {
    color: var(--accent-purple);
    background: rgba(124,58,237,0.08);
    border-color: rgba(124,58,237,0.3);
}

.flow-halt-note {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
}

.flow-halt-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-orange);
    background: rgba(249,115,22,0.1);
    border: 1px solid rgba(249,115,22,0.28);
    border-radius: 100px;
    padding: 2px 9px;
    margin-right: 4px;
}

.flow-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: -4px 0 14px;
}

.flow-branch-connector {
    width: 1px;
    height: 16px;
    background: var(--border-light);
}

/* ─── AI setup prompts ─── */
.docs-prompt-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.docs-prompt-card .code-block-prompt code { font-size: 0.78rem; }

.code-block-prompt code {
    font-family: 'Exo 2', sans-serif;
    white-space: pre-wrap;
    line-height: 1.7;
    color: #cfc9ec;
}

.code-block-prompt code strong,
.code-block-prompt code b { color: #e9e6f7; }

.code-block-prompt-preview code {
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prompt-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
    cursor: pointer;
    transition: var(--transition);
}

.prompt-expand-btn:hover { opacity: 0.75; }

.prompt-expand-btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

/* ─── Prompt modal ─── */
.prompt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,13,38,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 3000;
}

.prompt-modal-overlay[hidden] { display: none; }

.prompt-modal {
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15,13,38,0.4);
}

.prompt-modal-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.prompt-modal-head h3 {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
}

.prompt-modal-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 7px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.prompt-modal-close:hover { color: var(--text-primary); }

.prompt-modal-close svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

.prompt-modal .code-block-modal {
    margin: 18px 22px 22px;
    overflow-y: auto;
}

.prompt-modal .code-block-modal pre {
    max-height: 56vh;
    overflow-y: auto;
}

body.modal-open { overflow: hidden; }

@media (max-width: 560px) {
    .prompt-modal { max-height: 88vh; }
    .prompt-modal .code-block-modal pre { max-height: 62vh; }
}

/* ─── Framework switcher ─── */
/* Framework-specific blocks carry data-fw="<framework>"; the active framework
   lives on .docs-layout[data-framework]. Unmarked content is shared. */
.docs-layout[data-framework="langchain"] [data-fw]:not([data-fw="langchain"]),
.docs-layout[data-framework="strands"] [data-fw]:not([data-fw="strands"]) {
    display: none !important;
}

.fw-switch-wrap {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.fw-switch-label {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.fw-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 100px;
}

.fw-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    background: none;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.fw-switch-btn:hover { color: var(--text-primary); }

.fw-switch-btn:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.fw-switch-btn.is-active {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}

/* Logo chip inside each switcher button */
.fw-switch-ico {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.fw-switch-ico svg {
    width: 20px;
    height: 20px;
    display: block;
}

.fw-switch-btn:not(.is-active) .fw-switch-ico { opacity: 0.85; }

/* On a coloured (active) button the logo sits on a white chip so brand colours stay readable */
.fw-switch-btn.is-active .fw-switch-ico {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,13,38,0.25);
}

.fw-switch-btn.is-active .fw-switch-ico svg { width: 18px; height: 18px; }

/* ─── Language switcher (Python / TypeScript) ─── */
/* Python: the logo's blue with a yellow base line */
.sdk-btn-python:not(.is-active):hover { color: #3776AB; }

.sdk-btn-python.is-active {
    background: linear-gradient(135deg, #3776AB 0%, #2f6194 100%);
    box-shadow: inset 0 -3px 0 #FFD43B, 0 2px 10px rgba(55,118,171,0.35);
}

/* TypeScript: its own blue */
.sdk-btn-typescript:not(.is-active):hover { color: #3178C6; }

.sdk-btn-typescript.is-active {
    background: #3178C6;
    box-shadow: 0 2px 10px rgba(49,120,198,0.4);
}

.sdk-btn:focus-visible { outline-color: #3178C6; }

/* Language-specific visibility: blocks carry data-sdk-only="python" | "typescript".
   The active language lives on .docs-layout[data-sdk]. Unmarked content is shared. */
.docs-layout[data-sdk="python"] [data-sdk-only="typescript"],
.docs-layout[data-sdk="typescript"] [data-sdk-only="python"] {
    display: none !important;
}

/* Mobile-only language row inside the sidebar */
.sdk-switch-wrap-mobile { display: none; }

/* Compact variant that lives in the sticky TOC */
.docs-toc .fw-switch-wrap {
    margin: 0 0 24px;
    align-items: stretch;
    gap: 10px;
}

.docs-toc .fw-switch-label { text-align: left; }

.docs-toc .fw-switch {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    gap: 2px;
}

.docs-toc .fw-switch-btn {
    justify-content: flex-start;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* A subhead wrapped in a [data-fw] group is :first-child of the wrapper; keep normal spacing. */
.docs-section-body [data-fw] > .docs-subhead:first-child { margin-top: 28px; }
.docs-section-body > [data-fw]:first-child > .docs-subhead:first-child,
.docs-section-body > [data-sdk-only]:first-child > [data-fw]:first-child > .docs-subhead:first-child { margin-top: 0; }

/* The TOC is narrow: let the framework names wrap instead of overflowing. */
.docs-toc .fw-switch-btn { white-space: normal; text-align: left; line-height: 1.3; }

/* Small badge marking which framework a block belongs to */
.fw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--accent-purple);
    background: rgba(124,58,237,0.08);
    border: 1px solid rgba(124,58,237,0.22);
    border-radius: 100px;
    padding: 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    vertical-align: middle;
}

/* ─── Next steps ─── */
.docs-next h2 {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.docs-next-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.docs-next-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.docs-next-card:hover {
    border-color: rgba(124,58,237,0.2);
    box-shadow: 0 8px 32px rgba(30,27,75,0.1);
    transform: translateY(-3px);
}

.docs-next-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.docs-next-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .docs-header { padding: 112px 20px 0; }
    .docs-header-inner { padding: 32px 20px 28px; border-radius: var(--radius-lg); }
    .docs-main { padding: 28px 20px 80px; }
    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .docs-inner { gap: 56px; padding: 28px 20px 32px; border-radius: var(--radius-lg); }
    .docs-pattern-grid { grid-template-columns: 1fr; }
    .docs-next-grid { grid-template-columns: 1fr; }

    .docs-toc {
        position: static;
        padding: 20px 16px 16px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.98);
        border-radius: var(--radius-lg);
        box-shadow: 0 4px 24px rgba(30, 27, 75, 0.08);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .docs-toc-label { margin-bottom: 10px; }

    /* Mobile: the pill scroller needs no extra block around it */
    .docs-toc-nav {
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* On mobile the TOC switcher sits above the pill scroller; the header copy is redundant. */
    .docs-header .fw-switch-wrap { display: none; }
    .docs-toc .fw-switch-wrap { margin-bottom: 16px; }
    .docs-toc .sdk-switch-wrap-mobile { display: flex; }
    .docs-toc .fw-switch { flex-direction: row; border-radius: 100px; gap: 4px; }
    .docs-toc .fw-switch-btn { flex: 1; justify-content: center; border-radius: 100px; padding: 8px 12px; }

    .docs-toc-list {
        flex-direction: row;
        border-left: none;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

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

    .docs-toc-link {
        flex-shrink: 0;
        padding: 6px 12px;
        margin-left: 0;
        border-left: none;
        border-radius: 100px;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        white-space: nowrap;
    }

    .docs-toc-link.active {
        border-color: var(--accent-purple);
        background: rgba(124,58,237,0.06);
    }
}

@media (max-width: 380px) {
    .flow-diagram { flex-wrap: wrap; gap: 6px; }
}
