/* jifto for AI agents: the site API reference's layout (../developers/developers.css) plus lists,
   nested navigation, labelled code variants, figures and tables that stack on phones. */

.agents-page .api-nav a.agents-nav__sub {
    padding-left: 47px;
    font-size: 13.5px;
}

.agents-page .api-row h3 {
    margin: 30px 0 10px;
}

.agents-page .api-row__text ul,
.agents-page .api-row__text ol {
    margin: 0 0 16px;
    padding-left: 1.25em;
    color: var(--api-muted);
}

.agents-page .api-row__text li {
    margin: 0 0 8px;
    padding-left: 0.2em;
}

.agents-page .api-row__text li::marker {
    color: var(--api-faint);
}

.agents-page .api-row__text strong {
    color: var(--api-text);
    font-weight: 600;
}

.agents-page .api-table td a,
.agents-page .api-row__text li a {
    color: var(--api-text);
}

.agents-page .api-table thead th {
    font-size: 13px;
    color: var(--api-faint);
}

/* Tool names and field names stay on one line; everything else wraps. */
.agents-page .api-table--fields tbody th {
    color: var(--api-text);
}

.agents-page .api-table code {
    white-space: normal;
}

.agents-table--tools td:first-child {
    padding-right: 18px;
    white-space: nowrap;
}

.agents-table--tools td:first-child code {
    white-space: nowrap;
    overflow-wrap: normal;
}

.agents-table--stack td:first-child {
    width: 38%;
    padding-right: 18px;
    color: var(--api-text);
}

/* Many variants: the tabs wrap rather than hide behind a scroll. */
.agents-page .api-code__tabs {
    flex-wrap: wrap;
    overflow-x: visible;
}

/* A code panel with variants: each variant has a label in the markup, for readers without
   script; agents.js turns the labels into tabs. */
.api-code__label {
    margin: 0 !important;
    padding: 12px 16px 0;
    color: var(--api-faint) !important;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.api-code.has-tabs .api-code__label {
    display: none;
}

/* A code panel in the text column (the inside-Rhino script) scrolls with its text. */
.agents-page .api-row__text .api-code {
    position: static;
    margin: 6px 0 20px;
}

.api-code--wrap pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
}

.api-code--wrap pre code {
    overflow-wrap: anywhere;
}

/* The example reports, white A4 pages on the dark band. */
.agents-figure {
    margin: 0;
}

.agents-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #fff;
}

.agents-figure figcaption {
    margin-top: 8px;
    color: var(--api-faint);
    font-size: 12.5px;
    line-height: 1.5;
}

.agents-figure figcaption code {
    font-size: 0.95em;
}

@media (max-width: 860px) {
    .agents-page .api-nav a.agents-nav__sub {
        padding-left: 9px;
    }

    .agents-table--stack thead {
        display: none;
    }

    .agents-table--stack tr {
        display: block;
        padding: 11px 0;
        border-bottom: 1px solid var(--api-line);
    }

    .agents-table--stack td,
    .agents-table--stack td:first-child {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
    }

    .agents-table--stack td:first-child {
        margin-bottom: 4px;
    }
}
