:root {
    --botify-purple: #a973ff;
    --botify-midnight: #0b0911;
    --botify-midnight-tint: #211b32;
    --botify-green: #99eb47;
    --botify-blue: #33bbff;
    --botify-orange: #ff7333;
    --bg: #ffffff;
    --bg-subtle: #f8f6fc;
    --bg-code: #f3f0f8;
    --border: #e3ddec;
    --border-strong: #c9bfda;
    --text: var(--botify-midnight);
    --text-muted: #5f586c;
    --text-faint: #746c82;
    --accent: var(--botify-purple);
    --accent-soft: #f2e9ff;
    --accent-hover: #9962ed;
    --accent-strong: var(--botify-midnight-tint);
    --blue-soft: #e7f7ff;
    --green-soft: #efffde;
    --orange-soft: #fff0e9;
    --topbar-h: 56px;
    --tabbar-h: 44px;
    --sidebar-w: 288px;
    --radius: 10px;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

/* Author `display` rules otherwise override the UA [hidden] stylesheet. */
[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-h) + var(--tabbar-h) + 16px);
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: var(--mono);
    font-size: 0.86em;
}

/* ---------- top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--topbar-h);
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 500;
}

.brand-logo {
    display: block;
    width: 76px;
    height: 28px;
}

.brand-name {
    padding-left: 12px;
    border-left: 1px solid var(--border-strong);
    white-space: nowrap;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 420px;
    margin: 0 auto;
}

.search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    fill: var(--text-faint);
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 36px;
    padding: 0 44px 0 36px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.search input:focus {
    background: var(--bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(169, 115, 255, 0.16);
}

.search kbd {
    position: absolute;
    right: 10px;
    padding: 1px 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.topbar-links a:hover {
    color: var(--text);
}

.topbar-cta {
    padding: 5px 14px;
    color: var(--text) !important;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
}

.topbar-cta:hover {
    background: var(--bg-subtle);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px 6px;
    background: none;
    border: 0;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---------- tab bar ---------- */

.tabbar {
    position: sticky;
    top: var(--topbar-h);
    z-index: 29;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.tabbar-inner {
    display: flex;
    gap: 24px;
    max-width: 1440px;
    height: var(--tabbar-h);
    margin: 0 auto;
    padding: 0 24px;
}

.tab {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text);
}

.tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 500;
}

/* ---------- layout ---------- */

.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: calc(var(--topbar-h) + var(--tabbar-h));
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-h) - var(--tabbar-h));
    padding: 28px 20px 28px 24px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.sidebar-section {
    margin: 22px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.sidebar-section:first-child {
    margin-top: 0;
}

.sidebar-list {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 5px 10px;
    margin-left: -10px;
    font-size: 14px;
    color: var(--text-muted);
    border-radius: 6px;
}

.sidebar-link:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.sidebar-link.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

.sidebar-sublist {
    list-style: none;
    margin: 4px 0 8px 10px;
    padding-left: 10px;
    border-left: 1px solid var(--border);
}

.sidebar-sublink {
    display: block;
    padding: 3px 8px;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 6px;
}

.sidebar-sublink:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.sidebar-sublink.is-active {
    color: var(--accent);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
}

.nav-scrim {
    display: none;
}

.content {
    max-width: 880px;
    padding: 40px 56px 120px;
}

.content-wide {
    max-width: 1080px;
}

/* ---------- typography ---------- */

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.eyebrow:empty {
    display: none;
}

.page-title {
    margin: 6px 0 16px;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.lead {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

.description-long {
    margin-top: 14px;
    color: var(--text-muted);
    white-space: pre-line;
}

.content h2 {
    margin: 48px 0 12px;
    padding-top: 24px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-top: 1px solid var(--border);
}

.content h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.content p {
    margin: 12px 0;
}

.content p a:not(.inline-link):not(.button) {
    color: var(--accent);
    border-bottom: 1px solid rgba(169, 115, 255, 0.4);
}

.content li a {
    color: var(--accent);
}

.muted {
    color: var(--text-muted);
    font-size: 14px;
}

.inline-link {
    font-weight: 500;
    color: var(--accent) !important;
}

.stats {
    display: flex;
    gap: 24px;
    margin-top: 20px !important;
    font-size: 14px;
    color: var(--text-muted);
}

.stats strong {
    color: var(--text);
}

.link-list {
    margin: 12px 0 12px 20px;
    color: var(--text-muted);
}

.link-list li {
    margin: 6px 0;
}

.link-list-columns {
    columns: 2;
    column-gap: 32px;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 16px;
}

.home-illustration {
    margin: 56px 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.home-illustration img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- skill documents ---------- */

.skill-references {
    margin: 20px 0 28px;
    padding: 14px 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.skill-references-title {
    margin: 0 0 6px !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.skill-references ul {
    margin-left: 20px;
}

.skill-references li {
    margin: 4px 0;
}

.skill-markdown {
    margin-top: 32px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.skill-markdown h1 {
    margin: 24px 0 12px;
    font-size: 28px;
    line-height: 1.25;
}

.skill-markdown h2 {
    margin-top: 36px;
}

.skill-markdown ul,
.skill-markdown ol {
    margin: 12px 0 12px 24px;
}

.skill-markdown li {
    margin: 5px 0;
}

.skill-markdown pre {
    margin: 16px 0;
    padding: 14px 16px;
    overflow-x: auto;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.skill-markdown pre code {
    font-size: 12.5px;
    line-height: 1.6;
}

.skill-markdown :not(pre) > code {
    padding: 1px 5px;
    background: var(--bg-code);
    border-radius: 4px;
}

.skill-markdown table {
    width: 100%;
    margin: 16px 0;
    font-size: 14px;
    border-collapse: collapse;
}

.skill-markdown th,
.skill-markdown td {
    padding: 9px 11px;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--border);
}

.skill-markdown th {
    background: var(--bg-subtle);
    font-weight: 600;
}

.skill-markdown blockquote {
    margin: 16px 0;
    padding-left: 16px;
    color: var(--text-muted);
    border-left: 3px solid var(--border-strong);
}

.skill-markdown .mermaid {
    margin: 16px 0;
    padding: 20px 16px;
    overflow-x: auto;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.skill-markdown .mermaid:not([data-processed]),
.skill-markdown .mermaid.is-fallback {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    text-align: left;
    white-space: pre;
    background: var(--bg-code);
}

.skill-markdown .mermaid svg {
    max-width: 100%;
    height: auto;
}

/* ---------- cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 0 0 18px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.card:hover,
.card:focus-visible {
    border-color: var(--border-strong);
    box-shadow: 0 8px 24px rgba(11, 9, 17, 0.08);
    transform: translateY(-2px);
}

.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.card-thumb {
    display: grid;
    place-items: center;
    height: 148px;
    margin-bottom: 16px;
    overflow: hidden;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.card-thumb-mcp {
    --art-color: #8250c6;
    --art-highlight: var(--botify-purple);
    background: linear-gradient(135deg, var(--accent-soft) 0%, #dfcbff 100%);
}

.card-thumb-api {
    --art-color: #23769f;
    --art-highlight: var(--botify-blue);
    background: linear-gradient(135deg, var(--blue-soft) 0%, #b8e7ff 100%);
}

.card-thumb-tools {
    --art-color: #4b7827;
    --art-highlight: var(--botify-green);
    background: linear-gradient(135deg, var(--green-soft) 0%, #d2fba9 100%);
}

.card-art {
    display: block;
    width: 100%;
    max-width: 300px;
    height: 148px;
    color: var(--art-color);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-art-surface {
    fill: rgba(255, 255, 255, 0.8);
    stroke: var(--art-color);
    stroke-opacity: 0.2;
}

.card-art-track {
    stroke: currentColor;
    stroke-width: 1.25;
    opacity: 0.24;
}

.card-art-icon {
    stroke: currentColor;
    stroke-width: 1.7;
}

.card-art-signal {
    stroke: var(--art-highlight);
    stroke-width: 3;
    stroke-dasharray: 12 88;
    stroke-dashoffset: 12;
    opacity: 0;
}

.card-art-halo {
    fill: var(--art-highlight);
    opacity: 0.14;
    transform-box: fill-box;
    transform-origin: center;
}

.card-art-core {
    fill: var(--art-color);
    stroke: rgba(255, 255, 255, 0.7);
}

.card-art-core-icon {
    stroke: white;
    stroke-width: 2.2;
}

.card-art-status {
    fill: var(--botify-green);
    stroke: white;
    stroke-width: 2;
}

.card-art-dots {
    fill: currentColor;
    opacity: 0.4;
}

.card-art-code-line {
    stroke: currentColor;
    stroke-width: 3;
    opacity: 0.25;
}

.card-art-cursor {
    stroke: currentColor;
    stroke-width: 2;
}

.card-art-success {
    fill: var(--green-soft);
}

.card-art-label {
    fill: #416a22;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
}

.card-art-selection {
    fill: var(--art-highlight);
    fill-opacity: 0.25;
    stroke: currentColor;
    stroke-width: 1.5;
}

.card-art-tool-spark {
    stroke: currentColor;
    stroke-width: 1.5;
    opacity: 0.4;
}

/* A short introduction settles after one cycle; hover or keyboard focus replays it. */
@media (prefers-reduced-motion: no-preference) {
    .card-art-signal {
        animation: card-art-flow 4.8s ease-in-out both;
    }

    .card-art-halo {
        animation: card-art-pulse 4.8s ease-in-out both;
    }

    .card-art-response {
        animation-name: card-art-return;
    }

    .card-art-result {
        animation: card-art-result 4.8s ease-in-out both;
    }

    .card-art-cursor {
        animation: card-art-cursor 4.8s steps(1) both;
    }

    .card-art-selection {
        animation: card-art-select 4.8s cubic-bezier(0.65, 0, 0.35, 1) both;
    }

    .card-art-tool-spark {
        animation: card-art-spark 4.8s ease-in-out both;
    }

    .card:hover .card-art *,
    .card:focus-visible .card-art * {
        animation-iteration-count: infinite;
    }
}

@keyframes card-art-flow {
    0%, 8% { stroke-dashoffset: 12; opacity: 0; }
    14%, 40% { opacity: 1; }
    48%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@keyframes card-art-return {
    0%, 48% { stroke-dashoffset: 12; opacity: 0; }
    54%, 80% { opacity: 1; }
    88%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@keyframes card-art-pulse {
    0%, 100% { transform: scale(1); opacity: 0.14; }
    42%, 58% { transform: scale(1.12); opacity: 0.28; }
}

@keyframes card-art-result {
    0%, 25% { opacity: 0.3; transform: translateY(3px); }
    45%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes card-art-cursor {
    0%, 20%, 40%, 100% { opacity: 1; }
    10%, 30%, 50% { opacity: 0; }
}

@keyframes card-art-select {
    0%, 12%, 100% { transform: translate(0, 0); }
    26%, 38% { transform: translate(62px, 0); }
    52%, 64% { transform: translate(124px, 54px); }
    78%, 86% { transform: translate(0, 54px); }
}

@keyframes card-art-spark {
    0%, 100% { opacity: 0.4; }
    32%, 72% { opacity: 0.8; }
    48%, 88% { opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .card:hover,
    .card:focus-visible {
        transition: none;
        transform: none;
    }
}

.card-title {
    padding: 0 18px;
    font-size: 16px;
    font-weight: 600;
}

.card-text {
    padding: 4px 18px 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- tool catalog ---------- */

.filters {
    margin-top: 28px;
}

.filter-search {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    fill: var(--text-faint);
}

.filter-search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 38px;
    font: inherit;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
}

.filter-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chip {
    padding: 4px 12px;
    font: inherit;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.12s;
}

.chip:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.chip.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(169, 115, 255, 0.55);
    font-weight: 500;
}

.filter-count {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tool-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 6px 18px rgba(11, 9, 17, 0.07);
}

.tool-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tool-card-title {
    font-size: 15px;
    font-weight: 600;
}

.tool-card-text {
    flex: 1;
    font-size: 13.5px;
    color: var(--text-muted);
}

.tool-card-id {
    color: var(--text-faint);
    font-size: 12px;
}

.empty-state {
    padding: 40px 0;
    text-align: center;
    color: var(--text-faint);
}

.tool-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px !important;
}

.jump-links {
    display: flex;
    width: fit-content;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-subtle);
    overflow: hidden;
}

.jump-links a {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    border-right: 1px solid var(--border);
}

.jump-links a:last-child {
    border-right: 0;
}

.jump-links a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- badges ---------- */

.badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
}

.badge-mcp {
    color: var(--botify-midnight-tint);
    background: var(--accent-soft);
    border-color: rgba(169, 115, 255, 0.45);
}

/* ---------- code ---------- */

.code {
    position: relative;
    margin: 16px 0;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.code figcaption {
    padding: 8px 14px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.code pre,
.schema pre {
    padding: 14px 16px;
    overflow-x: auto;
}

.code code,
.schema code {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre;
    tab-size: 2;
}

.code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 3px 10px;
    font: inherit;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
}

.code:hover .code-copy,
.schema:hover .code-copy,
.code-copy:focus-visible {
    opacity: 1;
}

.code-copy:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.code-copy.is-copied {
    color: var(--accent);
    border-color: rgba(169, 115, 255, 0.55);
    opacity: 1;
}

.code-copy-inline {
    position: static;
    opacity: 1;
    margin-left: auto;
}

.schema {
    position: relative;
    margin: 12px 0;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.schema summary {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    cursor: pointer;
}

.schema[open] summary {
    border-bottom-color: var(--border);
}

.schema pre {
    max-height: 460px;
    overflow: auto;
}

/* ---------- schema docs (properties + example + $defs) ---------- */

.schema-doc {
    margin: 28px 0 8px;
}

.schema-doc-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 10px;
}

.schema-doc-heading h3 {
    margin: 0;
}

.schema-doc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 12px;
}

.schema-doc-grid-solo {
    grid-template-columns: minmax(0, 1fr);
}

.schema-doc-grid .code {
    margin: 0;
}

.schema-card {
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.schema-card-head {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.schema-card-body {
    padding: 4px 14px 8px;
}

.schema-prop {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.schema-prop:last-child {
    border-bottom: 0;
}

.schema-prop-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.schema-prop-name {
    color: var(--accent);
    font-size: 13px;
}

.schema-type {
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
}

.schema-required {
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 500;
    color: var(--botify-midnight-tint);
    background: var(--orange-soft);
    border: 1px solid #ffb899;
    border-radius: 999px;
}

.schema-prop-desc {
    margin: 6px 0 0 !important;
    font-size: 13.5px;
    color: var(--text-muted);
}

.schema-prop-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0 !important;
    font-size: 12.5px;
    color: var(--text-muted);
}

.schema-prop-meta code {
    color: var(--accent);
}

.schema-enum {
    padding: 1px 6px;
    color: var(--text) !important;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.schema-ref {
    padding: 1px 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--accent) !important;
    background: var(--accent-soft);
    border-radius: 999px;
}

.schema-ref:hover {
    background: #dfcbff;
}

.schema-ref-sep {
    color: var(--text-faint);
}

.schema-defs {
    margin-top: 28px;
}

.schema-defs-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.schema-def {
    overflow: hidden;
    scroll-margin-top: calc(var(--topbar-h) + var(--tabbar-h) + 16px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.schema-def-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--border);
}

.schema-def-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.schema-def-title code {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--accent);
}

.schema-def-anchor {
    color: var(--text-faint);
    font-size: 14px;
}

.schema-def-anchor:hover {
    color: var(--accent);
}

.schema-def-desc {
    margin: 0 !important;
    padding: 8px 14px;
    font-size: 13.5px;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    white-space: pre-line;
}

.schema-def-meta {
    padding: 8px 14px 0;
}

.schema-def-body {
    padding: 4px 14px 8px;
}

/* ---------- tabs (code samples) ---------- */

.tabs-group {
    margin: 16px 0;
}

.tabs-nav {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
}

.tabs-nav button {
    padding: 8px 14px;
    font: inherit;
    font-size: 13.5px;
    color: var(--text-muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
}

.tabs-nav button:hover {
    color: var(--text);
}

.tabs-nav button.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 500;
}

.tabs-panel .code {
    margin-top: 12px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ---------- endpoint rows ---------- */

.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    padding: 10px 14px;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.endpoint code {
    overflow-x: auto;
    white-space: nowrap;
}

.method {
    flex-shrink: 0;
    padding: 2px 8px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.method-post {
    color: var(--botify-midnight-tint);
    background: var(--green-soft);
    border-color: var(--botify-green);
}

/* ---------- callouts ---------- */

.callout {
    margin: 16px 0;
    padding: 14px 16px;
    font-size: 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: var(--radius);
}

.callout p {
    margin: 0 !important;
}

.callout-title {
    margin-bottom: 4px !important;
    font-weight: 600;
}

.callout-info {
    background: var(--blue-soft);
    border-left-color: var(--botify-blue);
}

.callout-warning {
    background: var(--orange-soft);
    border-color: #ffc7ad;
    border-left-color: var(--botify-orange);
}

/* ---------- tables ---------- */

.table {
    width: 100%;
    margin: 16px 0;
    font-size: 14px;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.table td {
    color: var(--text-muted);
    vertical-align: top;
}

.sku-table td:first-child {
    color: var(--text);
    font-weight: 500;
}

.sku-table th:nth-child(2),
.sku-table td:nth-child(2) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-align: right;
}

.sku-sources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
}

.sku-sources code {
    margin-left: 4px;
}

.sku-more {
    margin: 16px 0;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.sku-more summary {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.sku-more[open] summary {
    border-bottom: 1px solid var(--border);
}

.sku-more .sku-table {
    margin: 0;
}

/* ---------- playground ---------- */

.playground {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pg-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pg-payloads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
}

.pg-card {
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pg-card-head {
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.pg-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.pg-card-body > .field,
.pg-object > .field {
    margin: 0;
}

.field-desc {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--text-faint);
    line-height: 1.45;
}

.field select {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}

.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-check {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.field-check [data-pg-input] {
    width: auto;
}

.field-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.field-check-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
}

.field-check-item input {
    width: auto;
}

.pg-object {
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid rgba(169, 115, 255, 0.6);
    border-radius: 8px;
}

.pg-object legend {
    padding: 0 6px;
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.pg-object .field-desc {
    margin: 0 0 8px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field > span {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
}

.field textarea {
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.55;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.pg-endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pg-endpoint code {
    overflow-x: auto;
    white-space: nowrap;
    color: var(--text-muted);
}

.pg-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.button {
    padding: 8px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--botify-midnight);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
}

.button:hover {
    background: var(--accent-hover);
}

.button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.button-ghost {
    color: var(--text-muted);
    background: var(--bg);
    border-color: var(--border);
}

.button-ghost:hover {
    color: var(--text);
    background: var(--bg);
    border-color: var(--border-strong);
}

.pg-hint {
    font-size: 13px;
    color: var(--text-faint);
}

.pg-hint.is-error {
    color: var(--botify-orange);
}

.pg-result {
    margin-top: 18px;
}

.pg-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12.5px;
}

.pg-status .is-ok {
    color: var(--botify-midnight-tint);
}

.pg-status .is-ko {
    color: var(--botify-orange);
}

.pg-duration {
    color: var(--text-faint);
}

.pg-result .code {
    margin-top: 8px;
}

.pg-result pre {
    max-height: 420px;
    overflow: auto;
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
    .content {
        padding: 32px 32px 96px;
    }

    .split,
    .schema-doc-grid {
        grid-template-columns: 1fr;
    }

    .link-list-columns {
        columns: 1;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: flex;
    }

    .search {
        order: 3;
        flex-basis: 100%;
        display: none;
    }

    .topbar-links a:not(.topbar-cta) {
        display: none;
    }

    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        top: calc(var(--topbar-h) + var(--tabbar-h));
        left: 0;
        z-index: 25;
        width: var(--sidebar-w);
        background: var(--bg);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 12px 40px rgba(11, 9, 17, 0.16);
    }

    body.nav-open .nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 24;
        background: rgba(11, 9, 17, 0.3);
    }

    .content {
        padding: 24px 20px 80px;
    }

    .page-title {
        font-size: 30px;
    }

    .pg-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .brand-name {
        display: none;
    }

    .jump-links {
        width: 100%;
        border-radius: var(--radius);
    }

    .jump-links a {
        flex: 1;
        text-align: center;
    }
}
