/* =============================================================
 * Public documentation (/docs). Scoped under .zd.
 * Same language as the rest of the hub: Manrope (site-wide),
 * brand violet #693bf5 → #7C3AED, lavender surfaces, white cards
 * with #ece8ff borders, pill buttons (see monetize + agents/setup).
 * ============================================================= */

.zd {
    --zd-brand: #693bf5;
    --zd-brand-2: #7c3aed;
    --zd-brand-3: #a78bfa;
    --zd-grad: linear-gradient(135deg, #693bf5 0%, #7c3aed 100%);
    --zd-lav: #f5f3ff;
    --zd-lav-2: #f1edff;
    --zd-lav-3: #faf9ff;
    --zd-border: #ece8ff;
    --zd-border-strong: #dcd2ff;
    --zd-text: #0d0d0d;
    --zd-text-2: #374151;
    --zd-muted: #6b7280;
    --zd-radius: 20px;
    --zd-shadow: 0 1px 2px rgba(13, 13, 13, 0.04), 0 12px 32px rgba(91, 60, 251, 0.06);
    --zd-shadow-hover: 0 2px 6px rgba(13, 13, 13, 0.05), 0 16px 40px rgba(91, 60, 251, 0.12);
    --zd-sticky-top: 104px;

    position: relative;
    background: #fff;
    color: var(--zd-text-2);
    padding: 2.5rem 16px 5rem;
    overflow-x: clip;
}

.zd *,
.zd *::before,
.zd *::after {
    box-sizing: border-box;
}

/* Lavender wash behind the top of the page, as in the monetize hero. */
.zd__wash {
    position: absolute;
    /* Reaches up under the fixed header so there is no white band between them. */
    inset: -40px 0 auto 0;
    height: 500px;
    pointer-events: none;
    background:
        radial-gradient(55% 60% at 12% 0%, rgba(169, 144, 255, 0.20), transparent 70%),
        radial-gradient(45% 50% at 88% 0%, rgba(91, 60, 251, 0.10), transparent 70%),
        linear-gradient(180deg, #f8f6ff 0%, rgba(255, 255, 255, 0) 100%);
}

.zd :focus-visible {
    outline: 2px solid var(--zd-brand);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ---------- Layout ---------------------------------------- */
.zd__wrap {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1320px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .zd { padding: 3rem 32px 6rem; }

    .zd__wrap {
        grid-template-columns: 264px minmax(0, 1fr);
        gap: 3.5rem;
    }
}

@media (min-width: 1240px) {
    .zd__wrap--toc {
        grid-template-columns: 264px minmax(0, 1fr) 200px;
        gap: 3rem;
    }
}

/* ---------- Sidebar --------------------------------------- */
.zd-nav {
    min-width: 0;
}

.zd-nav__toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem 1.1rem;
    border: 1px solid var(--zd-border);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--zd-shadow);
    color: var(--zd-text);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.zd-nav__toggle i:first-child {
    color: var(--zd-brand);
}

.zd-nav__chevron {
    margin-left: auto;
    color: var(--zd-muted);
    transition: transform 0.2s ease;
}

.zd-nav.is-open .zd-nav__chevron {
    transform: rotate(180deg);
}

.zd-nav__panel {
    display: none;
    margin-top: 0.75rem;
    padding: 1.1rem;
    border: 1px solid var(--zd-border);
    border-radius: var(--zd-radius);
    background: #fff;
    box-shadow: var(--zd-shadow);
}

.zd-nav.is-open .zd-nav__panel {
    display: block;
}

@media (min-width: 992px) {
    .zd-nav {
        position: sticky;
        top: var(--zd-sticky-top);
        align-self: start;
    }

    .zd-nav__toggle {
        display: none;
    }

    .zd-nav__panel {
        display: block;
        margin-top: 0;
        max-height: calc(100vh - var(--zd-sticky-top) - 24px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.zd-nav__home {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.15rem 0.25rem 0.9rem;
    color: var(--zd-text);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.zd-nav__home:hover {
    color: var(--zd-text);
    text-decoration: none;
}

.zd-nav__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--zd-grad);
    color: #fff;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(91, 60, 251, 0.28);
}

.zd-searchbtn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.7rem 0.55rem 0.85rem;
    border: 1px solid var(--zd-border);
    border-radius: 999px;
    background: var(--zd-lav-3);
    color: var(--zd-muted);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.zd-searchbtn:hover {
    border-color: var(--zd-border-strong);
    background: #fff;
}

.zd-searchbtn i {
    font-size: 0.8rem;
}

.zd-searchbtn span {
    flex: 1;
}

.zd-searchbtn kbd,
.zd-palette kbd {
    padding: 0.05rem 0.4rem;
    border: 1px solid var(--zd-border);
    border-radius: 6px;
    background: #fff;
    color: var(--zd-muted);
    font-family: inherit;
    font-size: 0.68rem;
    box-shadow: none;
}

.zd-nav__group + .zd-nav__group {
    margin-top: 0.4rem;
}

.zd-nav__section {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.9rem 0 0.3rem;
    padding: 0 0.25rem;
    color: var(--zd-text);
    font-size: 0.85rem;
    font-weight: 700;
}

.zd-nav__section i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--zd-lav);
    color: var(--zd-brand);
    font-size: 0.7rem;
}

.zd-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zd-nav__link {
    position: relative;
    display: block;
    margin: 1px 0;
    padding: 0.45rem 0.75rem 0.45rem 2.05rem;
    border-radius: 10px;
    color: var(--zd-muted);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.zd-nav__link:hover {
    background: var(--zd-lav-3);
    color: var(--zd-text);
    text-decoration: none;
}

.zd-nav__link.is-active {
    background: var(--zd-lav-2);
    color: var(--zd-brand);
    font-weight: 700;
}

.zd-nav__link.is-active::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    left: 0.9rem;
    width: 3px;
    border-radius: 3px;
    background: var(--zd-grad);
}

.zd-nav__empty {
    margin: 0.75rem 0.25rem 0;
    color: var(--zd-muted);
    font-size: 0.85rem;
}

/* ---------- Page head ------------------------------------- */
.zd-main {
    min-width: 0;
}

.zd-head {
    max-width: 760px;
    margin-bottom: 1rem;
}

.zd-crumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--zd-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--zd-muted);
}

.zd-crumbs a {
    color: var(--zd-brand);
    text-decoration: none;
}

.zd-crumbs a:hover {
    text-decoration: underline;
}

.zd-crumbs i {
    font-size: 0.6rem;
    color: var(--zd-brand-3);
}

.zd-head__title {
    margin: 0;
    color: var(--zd-text);
    font-size: clamp(2rem, 4.2vw, 2.85rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.zd--home .zd-head__title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
}

/* Title row: title + "Copy page" split button. */
.zd-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.zd-pageact {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 0.5rem;
    border: 1px solid var(--zd-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(13, 13, 13, 0.04);
}

.zd-pageact__copy,
.zd-pageact__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--zd-text);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.zd-pageact__copy {
    padding: 0.45rem 0.8rem;
}

.zd-pageact__toggle {
    padding: 0.45rem 0.6rem;
    border-left: 1px solid var(--zd-border);
    color: var(--zd-muted);
    font-size: 0.7rem;
}

.zd-pageact__copy:hover,
.zd-pageact__toggle:hover {
    color: var(--zd-brand);
}

.zd-pageact__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 210px;
    padding: 0.35rem;
    border: 1px solid var(--zd-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--zd-shadow-hover);
}

.zd-pageact__menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    color: var(--zd-text);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.zd-pageact__menu a:hover {
    background: var(--zd-lav-3);
    color: var(--zd-brand);
    text-decoration: none;
}

/* Brand marks in the Copy page menu (docs/partials/brand-icon). */
.zd-pageact__menu .zd-brand {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.zd-pageact__sep {
    display: block;
    height: 1px;
    margin: 0.3rem 0.4rem;
    background: var(--zd-border);
}

.zd-pageact__menu i {
    width: 16px;
    color: var(--zd-brand);
    text-align: center;
}

/* Search palette (Cmd/Ctrl+K), over the content. */
.zd-palette {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.zd-palette[hidden] {
    display: none;
}

.zd-palette__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 13, 0.35);
    backdrop-filter: blur(2px);
}

.zd-palette__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(680px, calc(100% - 32px));
    max-height: min(620px, calc(100vh - 140px));
    margin: 12vh auto 0;
    border: 1px solid var(--zd-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(13, 13, 13, 0.25);
    overflow: hidden;
}

.zd-palette__input {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--zd-border);
}

.zd-palette__input i {
    color: var(--zd-brand);
}

.zd-palette__input input,
.zd-palette__input input:focus,
.zd-palette__input input:focus-visible {
    flex: 1;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent;
    color: var(--zd-text);
    font-size: 1.05rem;
}

.zd-palette__input kbd {
    cursor: pointer;
}

.zd-palette__results {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    overflow-y: auto;
}

.zd-palette__results:empty {
    display: none;
}

.zd-palette__results li {
    list-style: none;
}

.zd-palette__results a {
    display: block;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
}

.zd-palette__results a:hover,
.zd-palette__results a.is-selected {
    background: var(--zd-lav-2);
    text-decoration: none;
}

.zd-palette__meta {
    display: block;
    color: var(--zd-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.zd-palette__title {
    display: block;
    color: var(--zd-text);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.zd-palette__heading {
    color: var(--zd-brand);
    font-weight: 600;
}

.zd-palette__snippet {
    display: block;
    margin-top: 0.2rem;
    color: var(--zd-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.zd-palette__snippet mark {
    padding: 0 0.1em;
    border-radius: 3px;
    background: #ede9fe;
    color: var(--zd-brand);
}

.zd-palette__empty {
    margin: 0;
    padding: 1.25rem 1.1rem;
    color: var(--zd-muted);
    font-size: 0.9rem;
}

html.zd-noscroll {
    overflow: hidden;
}

/* ---------- Content --------------------------------------- */
.zd-content {
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

/* The first paragraph reads as the page lead. */
.zd-content > p:first-child {
    margin-bottom: 2rem;
    color: #4b5563;
    font-size: 1.125rem;
    line-height: 1.7;
}

.zd-content h2 {
    margin: 2.75rem 0 0.9rem;
    color: var(--zd-text);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    scroll-margin-top: var(--zd-sticky-top);
}

.zd-content h3 {
    margin: 1.75rem 0 0.6rem;
    color: var(--zd-text);
    font-size: 1.125rem;
    font-weight: 700;
}

.zd-content p,
.zd-content ul,
.zd-content ol {
    margin: 0 0 1.1rem;
}

.zd-content ul,
.zd-content ol {
    padding-left: 1.4rem;
}

.zd-content ul {
    list-style: disc;
}

.zd-content ol {
    list-style: decimal;
}

.zd-content li {
    display: list-item;
    list-style: inherit; /* style.css sets li { list-style: none } */
    margin-bottom: 0.45rem;
    padding-left: 0.2rem;
}

.zd-content li::marker {
    color: var(--zd-brand-3);
    font-weight: 700;
}

.zd-content a {
    color: var(--zd-brand);
    font-weight: 600;
    text-decoration: none;
}

.zd-content a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.zd-content strong {
    color: var(--zd-text);
    font-weight: 700;
}

.zd-content :not(pre) > code {
    /* !important: the layout forces Manrope on every element. */
    font-family: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.84em;
    padding: 0.15em 0.45em;
    border: 1px solid var(--zd-border);
    border-radius: 7px;
    background: var(--zd-lav);
    color: #5b21b6;
    overflow-wrap: anywhere;
}

/* Markdown "> " notes render as callouts. */
.zd-content blockquote {
    margin: 0 0 1.5rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--zd-border);
    border-left: 3px solid var(--zd-brand-2);
    border-radius: 12px;
    background: var(--zd-lav-3);
    color: var(--zd-text);
}

.zd-content blockquote p {
    margin: 0;
}

/* Callout (key status on /docs/mcp) and small print. */
.zd-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--zd-border);
    border-radius: 14px;
    background: var(--zd-lav-3);
}

.zd-callout > i {
    margin-top: 0.3rem;
    color: var(--zd-brand);
}

.zd-callout p {
    margin: 0;
    color: var(--zd-text);
}

.zd-callout--ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.zd-callout--ok > i {
    color: #16a34a;
}

.zd-content .zd-note {
    color: var(--zd-muted);
    font-size: 0.875rem;
}

.zd-content .zao {
    margin-bottom: 1rem;
}

/* MCP card: same look as the MCP banner on the API page. */
.zd-mcp-card {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem 1.1rem;
    border: 1px solid #ececf4;
    border-left: 3px solid var(--zd-brand-2);
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f5ff 0%, #ffffff 60%, #f5f3ff 100%);
    box-shadow: 0 1px 2px rgba(91, 60, 251, 0.04), 0 6px 20px rgba(91, 60, 251, 0.08);
}

.zd-mcp-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.zd-mcp-card + p,
.zd-mcp-card .zao {
    margin-top: 0.75rem;
}

.zd-mcp-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ede9fe;
    color: var(--zd-brand-2);
    font-size: 0.85rem;
}

.zd-mcp-card__text {
    flex: 1;
    min-width: 0;
}

.zd-mcp-card__text strong {
    display: block;
    color: #1a1a2e;
    font-size: 0.95rem;
    line-height: 1.3;
}

.zd-mcp-card__text span {
    display: block;
    margin-top: 2px;
    color: var(--zd-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.zd-mcp-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 575px) {
    .zd-mcp-card__actions {
        flex-basis: 100%;
        padding-left: calc(32px + 0.75rem);
    }
}

.zd-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--zd-border-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--zd-brand) !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none !important;
}

.zd-btn--primary {
    border-color: transparent;
    background: var(--zd-grad);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(91, 60, 251, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.zd-keycard {
    margin-bottom: 1.5rem;
}

/* Code blocks: white card, language bar, Copy pill (as on /agents/setup). */
.zd-code {
    margin: 0 0 1.5rem;
    border: 1px solid var(--zd-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--zd-shadow);
    overflow: hidden;
}

.zd-code__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.4rem 0.5rem 0.4rem 1rem;
    border-bottom: 1px solid var(--zd-border);
    background: var(--zd-lav-3);
}

.zd-code__lang {
    color: var(--zd-muted);
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.75rem;
    font-weight: 600;
}

.zd-code__copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border: 0;
    border-radius: 999px;
    background: var(--zd-grad);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(91, 60, 251, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.zd-code__copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(91, 60, 251, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.zd-code__copy.is-copied {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.zd-code pre {
    margin: 0;
    padding: 1rem 1.15rem 1.1rem;
    background: #fff;
    overflow-x: auto;
}

.zd-code pre code {
    font-family: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.84rem;
    line-height: 1.7;
    color: #1f2937;
    background: transparent;
    white-space: pre;
}

/* The site layout runs highlight.js on every <pre><code>: keep its
   highlighting, but with the docs frame, a monospace face on every token
   (global-font.css forces Manrope on *) and brand-aligned colors. */
.zd-code pre {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.zd-code pre *,
.zd-code code.hljs {
    font-family: 'SF Mono', ui-monospace, Menlo, Monaco, Consolas, monospace !important;
}

.zd-code code.hljs {
    padding: 0 !important;
    background: transparent !important;
    color: #1f2937 !important;
}

.zd-code .hljs-attr,
.zd-code .hljs-keyword,
.zd-code .hljs-name,
.zd-code .hljs-selector-tag {
    color: #6d28d9 !important;
}

.zd-code .hljs-string,
.zd-code .hljs-link {
    color: #0f766e !important;
}

.zd-code .hljs-number,
.zd-code .hljs-literal,
.zd-code .hljs-variable,
.zd-code .hljs-template-variable {
    color: #c2410c !important;
}

.zd-code .hljs-built_in,
.zd-code .hljs-title,
.zd-code .hljs-type {
    color: #2563eb !important;
}

.zd-code .hljs-punctuation,
.zd-code .hljs-operator,
.zd-code .hljs-meta,
.zd-code .hljs-comment {
    color: #6b7280 !important;
}

/* Code tabs: consecutive blocks share one card with a tab bar. */
.zd-tabs {
    position: relative;
    margin: 0 0 1.5rem;
    border: 1px solid var(--zd-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--zd-shadow);
    overflow: hidden;
}

.zd-tabs__bar {
    display: flex;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem 0;
    border-bottom: 1px solid var(--zd-border);
    background: var(--zd-lav-3);
    overflow-x: auto;
}

.zd-tabs__tab {
    padding: 0.5rem 0.85rem;
    border: 0;
    border-radius: 0 !important;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--zd-muted);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

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

.zd-tabs__tab.is-active {
    border-bottom-color: var(--zd-brand);
    color: var(--zd-brand);
}

/* Inside tabs the block loses its own frame; its bar only keeps the Copy pill. */
.zd-code--tabbed {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* The visible block's Copy pill sits on the tab bar. */
.zd-code--tabbed .zd-code__bar {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    min-height: 0;
    padding: 0;
    border-bottom: 0;
    background: transparent;
}

.zd-code--tabbed .zd-code__lang {
    display: none;
}

.zd-code--tabbed .zd-code__bar {
    justify-content: flex-end;
}

/* Tables: rounded card, lavender header row. */
.zd-table {
    margin: 0 0 1.5rem;
    border: 1px solid var(--zd-border);
    border-radius: 16px;
    background: #fff;
    overflow-x: auto;
}

.zd-table table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.55;
}

.zd-table th,
.zd-table td {
    padding: 0.75rem 1rem;
    border: 0;
    text-align: left;
    vertical-align: top;
}

.zd-table th {
    background: var(--zd-lav-3);
    border-bottom: 1px solid var(--zd-border);
    color: var(--zd-text);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.zd-table td {
    border-top: 1px solid #f3f1fb;
}

.zd-table tr:first-child td {
    border-top: 0;
}

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

/* Identifiers in the first column (tool names, methods, codes) never break mid-word. */
.zd-table td:first-child code {
    white-space: nowrap;
    overflow-wrap: normal;
}

/* ---------- Docs home: two audience cards ------------------ */
.zd-paths {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin: 0.5rem 0 2.5rem;
}

@media (min-width: 768px) {
    .zd-paths {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.zd--home .zd-content,
.zd--home .zd-head,
.zd--home .zd-pager {
    max-width: 1000px;
}

.zd-path {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--zd-border);
    border-radius: var(--zd-radius);
    background: #fff;
    box-shadow: var(--zd-shadow);
}

.zd-path__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--zd-grad);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(91, 60, 251, 0.28);
}

.zd-content .zd-path h2 {
    margin: 1rem 0 0.75rem;
    font-size: 1.3rem;
}

.zd-content .zd-path ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zd-content .zd-path li {
    list-style: none;
    margin: 0;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    transition: background-color 0.15s ease;
}

.zd-content .zd-path li + li {
    margin-top: 2px;
}

.zd-content .zd-path li.is-clickable {
    cursor: pointer;
}

.zd-content .zd-path li:hover {
    background: var(--zd-lav-3);
}

.zd-content .zd-path li a {
    display: block;
    color: var(--zd-text);
    font-weight: 700;
}

.zd-content .zd-path li:hover a {
    color: var(--zd-brand);
    text-decoration: none;
}

.zd-path__desc::first-letter {
    text-transform: uppercase;
}

.zd-path__desc {
    display: block;
    margin-top: 0.15rem;
    color: var(--zd-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ---------- Need help? (opens the support chat) ------------ */
.zd-help {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    max-width: 760px;
    margin-top: 3rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--zd-border);
    border-radius: 16px;
    background: var(--zd-lav-3);
}

.zd--home .zd-help {
    max-width: 1000px;
}

.zd-help__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ede9fe;
    color: var(--zd-brand-2);
}

.zd-help__text {
    flex: 1;
    min-width: 180px;
}

.zd-help__text strong {
    display: block;
    color: var(--zd-text);
}

.zd-help__text span {
    color: var(--zd-muted);
    font-size: 0.9rem;
}

.zd-help .zd-btn {
    gap: 0.45rem;
    cursor: pointer;
}

.zd-pager {
    margin-top: 1.5rem !important;
}

/* ---------- Prev / next ----------------------------------- */
.zd-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    max-width: 760px;
    margin-top: 3.5rem;
}

.zd-pager__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    max-width: 48%;
    padding: 0.95rem 1.2rem;
    border: 1px solid var(--zd-border);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.zd-pager__link:hover {
    border-color: var(--zd-border-strong);
    box-shadow: var(--zd-shadow-hover);
    text-decoration: none;
}

.zd-pager__link--next {
    margin-left: auto;
    text-align: right;
}

.zd-pager__label {
    color: var(--zd-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.zd-pager__label i {
    color: var(--zd-brand);
}

.zd-pager__title {
    color: var(--zd-text);
    font-weight: 700;
    line-height: 1.35;
}

/* ---------- On this page ---------------------------------- */
.zd-toc {
    display: none;
}

@media (min-width: 1240px) {
    .zd-toc {
        display: block;
        position: sticky;
        top: var(--zd-sticky-top);
        align-self: start;
        padding-top: 0.5rem;
    }
}

.zd-toc__title {
    margin: 0 0 0.75rem;
    color: var(--zd-text);
    font-size: 0.85rem;
    font-weight: 700;
}

.zd-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--zd-border);
}

.zd-toc__list li {
    list-style: none;
}

.zd-toc__link {
    display: block;
    margin-left: -2px;
    padding: 0.3rem 0 0.3rem 0.9rem;
    border-left: 2px solid transparent;
    color: var(--zd-muted);
    font-size: 0.84rem;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.zd-toc__link:hover {
    color: var(--zd-text);
    text-decoration: none;
}

.zd-toc__link.is-active {
    border-left-color: var(--zd-brand);
    color: var(--zd-brand);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .zd *,
    .zd *::before,
    .zd *::after {
        transition: none !important;
    }
}
