html {
            overflow-x: hidden;
        }

        body {
            background-color: #ffffff;
            color: #000000;
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            -webkit-font-smoothing: antialiased;
        }

        h1, h2, h3, .serif { font-family: Georgia, "Times New Roman", serif; }
        .mono { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Type scale tokens */
        :root {
            --t-eyebrow: 16px; --t-caption: 17px; --t-label: 19px;
            --t-body: 20px;    --t-body-lg: 22px;
            --o-ambient: 0.20; --o-meta: 0.30; --o-secondary: 0.50; --o-primary: 0.65;
        }

        footer {
            background-color: #ffffff;
            color: #000000;
            padding: 40px 5%;
            position: relative;
            z-index: 1200;
            border-top: 1px solid rgba(0,0,0,0.06);
            overflow: visible;
        }

        .footer-inner { gap: 28px; }
        .footer-brand,
        .footer-year { flex-shrink: 0; }
        .footer-groups { flex-wrap: wrap; justify-content: center; row-gap: 14px; }
        .footer-column-trigger { position: relative; cursor: default; padding: 0 0 8px; }
        .footer-column-title {
            font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
            font-size: 8px;
            text-transform: uppercase;
            letter-spacing: 0.3em;
            opacity: 0.35;
            transition: opacity 0.2s;
        }
        .footer-column-trigger:hover .footer-column-title,
        .footer-column-trigger:focus-within .footer-column-title { opacity: 1; }
        .footer-submenu {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 7px;
            min-width: max-content;
            padding: 10px 12px 12px;
            background: rgba(255,255,255,0.96);
            border: 1px solid rgba(0,0,0,0.08);
            box-shadow: 0 16px 40px rgba(0,0,0,0.08);
            border-radius: 6px;
            visibility: hidden;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
            z-index: 1;
        }
        .footer-column-trigger:hover .footer-submenu,
        .footer-column-trigger:focus-within .footer-submenu {
            visibility: visible;
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) translateY(0);
        }
        .footer-link {
            font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            opacity: 0.62;
            white-space: nowrap;
            text-decoration: none;
            color: #000000;
            transition: opacity 0.2s;
        }
        .footer-link:hover { opacity: 1; }
        .locale-active { opacity: 0.9; }

        @media (max-width: 768px) {
            footer { padding: 36px 5%; }
            .footer-inner {
                gap: 24px;
                align-items: center;
                text-align: center;
            }
            .footer-brand {
                flex-direction: column;
                gap: 10px;
            }
            .footer-groups {
                order: 3;
                width: 100%;
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 18px 20px;
                align-items: start;
            }
            .footer-column-trigger {
                padding: 0;
                display: flex;
                flex-direction: column-reverse;
                align-items: center;
                gap: 8px;
            }
            .footer-column-title {
                opacity: 0.45;
                font-size: 9px;
            }
            .footer-submenu {
                position: static;
                transform: none;
                visibility: visible;
                opacity: 1;
                pointer-events: auto;
                padding: 0;
                background: transparent;
                border: 0;
                box-shadow: none;
                border-radius: 0;
                gap: 8px;
            }
            .footer-column-trigger:hover .footer-submenu,
            .footer-column-trigger:focus-within .footer-submenu {
                transform: none;
            }
            .footer-link {
                opacity: 0.55;
                font-size: 10px;
                letter-spacing: 0.14em;
            }
            .footer-year { order: 4; }
        }

        @media (max-width: 420px) {
            .footer-groups { grid-template-columns: 1fr; }
        }

        :root { --accent-soft: rgba(0,0,0,0.06); }
        html,
        body { overflow-x: clip; }

        /* Navigation */
        nav {
            position: fixed;
            top: 0; left: 0; width: 100%;
            height: 100px;
            display: flex; justify-content: space-between; align-items: center;
            padding: 0 5%;
            z-index: 1200;
            background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(0,0,0,0.05);
            color: #000000;
        }
        .nav-btn-primary {
            padding: 12px 24px;
            background: #000000; color: #ffffff;
            border-radius: 99px;
            font-size: 16px; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.15em;
            transition: all 0.3s ease;
        }
        .nav-btn-primary:hover { background: #333; }

        /* Scroll Progress */
        #scroll-tracker {
            position: fixed; bottom: 40px; right: 40px;
            height: 60px; width: 1px;
            background: rgba(0,0,0,0.1); z-index: 2000;
        }
        #scroll-bar { width: 100%; height: 0%; background: #000; transition: height 0.1s linear; }

        /* Menu Overlay */
        #menu-overlay {
            position: fixed; top: 0; left: 0;
            width: 100%; height: 100%;
            background: #ffffff; z-index: 2000;
            display: flex; flex-direction: column;
            justify-content: center; align-items: center;
            transform: translateY(-100%);
            transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
        }
        #menu-overlay.active { transform: translateY(0); }

        /* 3-Column Layout */
        #docs-wrapper {
            display: grid;
            grid-template-columns: 220px minmax(0, 1fr) 220px;
            min-height: calc(100vh - 100px);
            width: 90%;
            max-width: 1320px;
            margin: 100px auto 0;
        }

        /* Left Sidebar */
        #docs-sidebar {
            position: fixed;
            top: 100px;
            left: max(5%, calc((100vw - 1320px) / 2));
            width: 220px;
            height: calc(100vh - 100px);
            overflow-y: auto;
            border-right: 1px solid var(--accent-soft);
            padding: 40px 24px;
            scrollbar-width: none;
            background: #ffffff;
            z-index: 50;
        }
        #docs-sidebar::-webkit-scrollbar { display: none; }

        .nav-group { margin-bottom: 32px; }
        .nav-group-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.3em;
            opacity: 0.3;
            font-weight: 700;
            margin-bottom: 10px;
            padding-left: 8px;
        }
        .nav-item {
            display: block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            padding: 6px 8px;
            border-radius: 4px;
            cursor: pointer;
            opacity: 0.45;
            transition: all 0.2s ease;
            letter-spacing: 0.02em;
            margin-bottom: 2px;
            text-decoration: none;
            color: #000;
        }
        .nav-item:hover { opacity: 0.9; background: rgba(0,0,0,0.03); }
        .nav-item.active { opacity: 1; background: rgba(0,0,0,0.05); font-weight: 700; }
        .nav-item.disabled {
            opacity: 0.2;
            cursor: default;
            pointer-events: none;
        }
        .nav-item.disabled::after {
            content: ' —';
            opacity: 0.5;
            font-size: 16px;
        }

        /* Center Docs */
        #docs-content {
            grid-column: 2;
            padding: 60px 64px;
            max-width: 840px;
            border-right: 1px solid var(--accent-soft);
        }

        .doc-section { padding-bottom: 80px; margin-bottom: 16px; }
        .doc-section:last-child { padding-bottom: 120px; }

        .api-index-hero { padding-bottom: 34px; margin-bottom: 20px; }
        .api-guide-link {
            display: inline-flex;
            align-items: center;
            margin-top: 18px;
            color: inherit;
            text-decoration: none;
            font-size: 14px;
            line-height: 1.55;
            opacity: 0.58;
            border-bottom: 1px solid rgba(0,0,0,0.16);
            transition: opacity 0.2s, border-color 0.2s;
        }
        .api-guide-link:hover {
            opacity: 0.86;
            border-color: rgba(0,0,0,0.42);
        }
        .api-index-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin: 28px 0 44px;
        }
        .api-index-card {
            display: block;
            color: inherit;
            text-decoration: none;
            border: 1px solid rgba(0,0,0,0.08);
            padding: 18px;
            min-height: 142px;
            background: rgba(255,255,255,0.72);
            transition: border-color 0.2s, transform 0.2s, background 0.2s;
        }
        .api-index-card:hover {
            border-color: rgba(0,0,0,0.22);
            transform: translateY(-1px);
            background: #fff;
        }
        .api-index-card .card-title {
            font-family: 'Playfair Display', serif;
            font-style: italic;
            font-size: 24px;
            line-height: 1.15;
            margin-bottom: 10px;
        }
        .api-index-card .card-desc {
            font-size: 14px;
            line-height: 1.55;
            opacity: 0.62;
            margin-bottom: 16px;
        }
        .api-index-card .card-links {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .api-index-card .card-chip {
            font-family: 'JetBrains Mono', monospace;
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            opacity: 0.48;
        }

        .section-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 0.4em;
            opacity: 0.25;
            margin-bottom: 12px;
        }
        .section-title {
            font-family: 'Playfair Display', serif;
            font-size: 28px;
            font-style: italic;
            margin-bottom: 12px;
            line-height: 1.2;
        }
        /* When no section-label precedes the title, give it a little breathing room */
        .doc-section > .section-title:first-child {
            margin-top: 10px;
        }
        .section-desc {
            font-size: 16px;
            opacity: 0.72;
            line-height: 1.65;
            margin-bottom: 32px;
            max-width: 680px;
            overflow-wrap: break-word;
        }

        /* Dividers */
        .doc-divider {
            height: 1px;
            background: rgba(0,0,0,0.06);
            margin: 32px 0;
        }

        /* Endpoints */
        .endpoints-list { margin-bottom: 28px; }
        .endpoint-row {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            grid-template-rows: auto auto;
            align-items: start;
            column-gap: 12px;
            row-gap: 3px;
            padding: 10px 0;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            font-family: 'JetBrains Mono', monospace;
            font-size: 17px;
            list-style: none;
            cursor: default;
        }
        .endpoint-row::-webkit-details-marker { display: none; }
        summary.endpoint-row { cursor: pointer; }
        .method {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0.1em;
            padding: 3px 8px;
            border-radius: 3px;
            min-width: 44px;
            text-align: center;
            grid-column: 1;
            grid-row: 1 / span 2;
        }
        .method-get   { background: rgba(0,0,0,0.06); color: #000; }
        .method-post  { background: #000; color: #fff; }
        .method-patch { background: rgba(0,0,0,0.14); color: #000; }
        .method-put   { background: rgba(0,0,0,0.18); color: #000; }
        .method-del   { background: rgba(0,0,0,0.08); color: rgba(0,0,0,0.6); }
        .endpoint-path {
            opacity: 1;
            grid-column: 2;
            grid-row: 1;
            min-width: 0;
            overflow-wrap: anywhere;
        }
        .endpoint-desc {
            font-size: 15px;
            line-height: 1.35;
            opacity: 0.48;
            margin-left: 0;
            font-family: 'Inter', sans-serif;
            grid-column: 2;
            grid-row: 2;
            min-width: 0;
        }

        /* Code blocks */
        .code-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            text-transform: uppercase;
            letter-spacing: 0.2em;
            opacity: 0.5;
            margin-bottom: 8px;
        }
        .code-block {
            background: #f8f8f8;
            border: 1px solid rgba(0,0,0,0.06);
            border-radius: 6px;
            padding: 20px 24px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 14px;
            line-height: 1.6;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
            overflow-x: hidden;
            margin-bottom: 20px;
            white-space: pre-wrap;
            overflow-wrap: anywhere;
            word-break: break-word;
            color: #000;
        }
        .code-block * {
            white-space: inherit;
            overflow-wrap: inherit;
            word-break: inherit;
        }
        .code-block .key   { opacity: 0.7; }
        .code-block .val   { opacity: 0.9; }
        .code-block .cmt   { opacity: 0.4; font-style: italic; }
        .code-block .muted { opacity: 0.4; }

        /* Params table */
        .params-table {
            width: 100%;
            margin-bottom: 28px;
            border-collapse: collapse;
            table-layout: fixed;
        }
        .params-table th {
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.25em;
            opacity: 0.42;
            text-align: left;
            padding: 0 12px 10px 0;
            border-bottom: 1px solid rgba(0,0,0,0.06);
            font-weight: 700;
            white-space: nowrap;   /* keep headers on one line */
        }
        .params-table td {
            font-size: 15px;
            line-height: 1.55;
            opacity: 0.72;
            padding: 12px 14px 12px 0;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            vertical-align: top;
        }
        /* Fixed-width columns — let Description fill the rest and wrap */
        .params-table td:first-child,
        .params-table th:first-child { width: 160px; }
        .params-table td:nth-child(2),
        .params-table th:nth-child(2) { width: 150px; }
        .params-table td:nth-child(3):not(:last-child),
        .params-table th:nth-child(3):not(:last-child) { width: 90px; }
        .params-table.wide-second td:nth-child(2),
        .params-table.wide-second th:nth-child(2) { width: 250px; }
        .params-table.event-types-table td:first-child,
        .params-table.event-types-table th:first-child { width: 155px; }
        .params-table.event-types-table td:nth-child(2),
        .params-table.event-types-table th:nth-child(2) { width: 115px; }
        .params-table.event-types-table td:nth-child(3):not(:last-child),
        .params-table.event-types-table th:nth-child(3):not(:last-child) { width: auto; }
        .params-table.event-types-table td:nth-child(4),
        .params-table.event-types-table th:nth-child(4) { width: 120px; }
        .params-table.contract-table td:first-child,
        .params-table.contract-table th:first-child { width: 220px; }
        .params-table.contract-table td:nth-child(2),
        .params-table.contract-table th:nth-child(2) { width: 92px; }
        .params-table.contract-table td:nth-child(3),
        .params-table.contract-table th:nth-child(3),
        .params-table.contract-table td:nth-child(4),
        .params-table.contract-table th:nth-child(4) { width: 220px; }
        .params-table.contract-table td:nth-child(5),
        .params-table.contract-table th:nth-child(5) { width: auto; }
        .params-table td:last-child {
            overflow-wrap: anywhere;
            word-break: normal;
            white-space: normal;
        }
        .params-table td,
        .params-table td * {
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .params-table td code,
        .params-table td strong {
            font-size: inherit;
            white-space: normal;
        }
        .param-name { font-family: 'JetBrains Mono', monospace; font-size: 16px; }
        .param-type { font-family: 'JetBrains Mono', monospace; font-size: 16px; opacity: 0.5; }
        .param-req  { font-family: 'JetBrains Mono', monospace; font-size: 16px; opacity: 0.45; }
        .param-desc { font-size: 17px; opacity: 0.7; line-height: 1.5; }
        .param-group-header td { font-size: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.35; padding-top: 18px; padding-bottom: 4px; border-bottom: none; }

        .schema-group {
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .schema-group:last-of-type {
            border-bottom: 1px solid rgba(0,0,0,0.08);
        }
        .schema-group-summary {
            cursor: pointer;
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 18px 0;
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            letter-spacing: 0.18em;
            text-transform: uppercase;
        }
        .schema-group-summary::-webkit-details-marker { display: none; }
        .schema-group-summary::after,
        .schema-summary::after {
            content: "+";
            font-family: 'JetBrains Mono', monospace;
            font-size: 18px;
            opacity: 0.35;
            flex: 0 0 auto;
        }
        .schema-group[open] > .schema-group-summary::after,
        .schema-drawer[open] .schema-summary::after {
            content: "-";
        }
        .schema-drawer {
            border-top: 1px solid rgba(0,0,0,0.08);
            margin-left: 22px;
        }
        .schema-drawer:last-of-type {
            border-bottom: none;
        }
        .schema-summary {
            cursor: pointer;
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 18px 0;
        }
        .schema-summary::-webkit-details-marker { display: none; }
        .schema-drawer .schema-section-title {
            font-size: 20px;
            margin: 0;
        }
        .schema-field-count {
            margin-left: auto;
            font-family: 'JetBrains Mono', monospace;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.18em;
            opacity: 0.38;
            white-space: nowrap;
        }
        .schema-drawer .params-table {
            margin: 0 0 30px;
        }

        /* Notes */
        .doc-note {
            border-left: 2px solid rgba(0,0,0,0.1);
            padding: 12px 16px;
            font-size: 15px;
            opacity: 0.68;
            line-height: 1.6;
            margin: 20px 0;
            font-style: italic;
            overflow-wrap: break-word;
        }

        /* Response Drawer */
        .response-drawer {
            margin-bottom: 28px;
            border: 1px solid rgba(0,0,0,0.07);
            border-radius: 6px;
            overflow: hidden;
        }
        .response-drawer > summary {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 14px;
            cursor: pointer;
            background: rgba(0,0,0,0.015);
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            letter-spacing: 0.06em;
            color: rgba(0,0,0,0.45);
            list-style: none;
            user-select: none;
            transition: background 0.15s ease;
        }
        .response-drawer > summary::-webkit-details-marker { display: none; }
        .response-drawer > summary::before {
            content: '▶';
            font-size: 16px;
            opacity: 0.35;
            transition: transform 0.2s ease;
            flex-shrink: 0;
        }
        .response-drawer[open] > summary::before { transform: rotate(90deg); }

        /* Inside endpoints-list: hide the triangle, use a subtle right-side arrow instead */
        .endpoints-list .response-drawer > summary::before { display: none; }
        .endpoints-list .response-drawer > summary::after {
            content: '↓';
            font-size: 16px;
            opacity: 0.25;
            margin-left: 0;
            transition: transform 0.2s ease;
            grid-column: 3;
            grid-row: 1 / span 2;
            align-self: center;
        }
        .endpoints-list .response-drawer[open] > summary::after {
            transform: rotate(180deg);
        }
        /* Override response-drawer background on summary when it's an endpoint-row */
        .endpoints-list .response-drawer > summary.endpoint-row {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            grid-template-rows: auto auto;
            align-items: start;
            column-gap: 12px;
            row-gap: 3px;
            background: transparent;
            padding: 10px 0;
            font-size: 17px;
            letter-spacing: normal;
            color: inherit;
        }
        .endpoints-list .response-drawer[open] > summary.endpoint-row {
            border-bottom: none;
        }
        .endpoints-list .response-drawer > summary.endpoint-row:hover {
            background: rgba(0,0,0,0.02);
        }
        .response-drawer[open] > summary { border-bottom: 1px solid rgba(0,0,0,0.07); }
        .response-drawer > summary:hover { background: rgba(0,0,0,0.03); }
        .response-drawer .code-block { margin: 0; border-radius: 0; border: none; }

        /* Quickstart steps */
        .qs-step {
            display: flex;
            gap: 20px;
            margin-bottom: 40px;
        }
        .qs-step-num {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            opacity: 0.2;
            min-width: 24px;
            padding-top: 2px;
        }
        .qs-step-body { flex: 1; }
        .qs-step-title {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 12px;
        }

        /* Error table */
        .error-row td:first-child {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
        }

        /* Schema block */
        .schema-object {
            background: #f8f8f8;
            border: 1px solid rgba(0,0,0,0.06);
            border-radius: 6px;
            padding: 20px 24px;
            margin-bottom: 20px;
        }
        .schema-object-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 14px;
            opacity: 0.7;
        }
        .schema-field {
            display: flex;
            gap: 16px;
            padding: 6px 0;
            border-bottom: 1px solid rgba(0,0,0,0.04);
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
        }
        .schema-field:last-child { border-bottom: none; }
        .schema-field-name { min-width: 140px; opacity: 0.85; }
        .schema-field-type { min-width: 80px; opacity: 0.5; }
        .schema-field-desc { opacity: 0.65; font-family: 'Inter', sans-serif; font-size: 16px; }

        /* Inline "yields id" badge on endpoint rows */
        .yields-id {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            opacity: 0.9;
            background: rgba(0,0,0,0.11);
            border-radius: 3px;
            padding: 1px 5px;
            margin-left: 10px;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        /* Schema field-reference link */
        a.schema-link {
            display: block;
            margin-top: 2px;
            margin-bottom: 16px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            opacity: 0.6;
            text-decoration: none;
            color: inherit;
        }
        a.schema-link:hover { opacity: 0.9; }

        /* Right Visual */
        #docs-visual {
            grid-column: 3;
            position: sticky;
            top: 100px;
            align-self: start;
            height: calc(100vh - 100px);
            overflow: hidden;
            background: #ffffff;
        }
        #docs-visual svg { width: 100%; height: 100%; }

        .visual-state { opacity: 0; transition: opacity 0.6s ease; }
        .visual-state.active { opacity: 1; }

        @media (max-width: 1200px) {
            #docs-wrapper { grid-template-columns: 200px 1fr; }
            #docs-visual {
                position: fixed;
                top: 100px; left: 0;
                width: 100%; height: calc(100vh - 100px);
                opacity: 0.08;
                z-index: 0;
                pointer-events: none;
                border: none;
                background: transparent;
            }
            #docs-sidebar {
                left: max(5%, calc((100vw - 1320px) / 2));
                width: 200px;
                z-index: 50;
            }
            #docs-content { position: relative; z-index: 10; }
        }

        /* Mobile section picker */
        #mobile-nav {
            display: none;
            position: sticky;
            top: 68px;
            z-index: 100;
            background: rgba(255,255,255,0.97);
            backdrop-filter: blur(8px);
            border-bottom: 1px solid rgba(0,0,0,0.07);
            padding: 8px 20px;
        }
        #mobile-nav select {
            width: 100%;
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            padding: 8px 12px;
            border: 1px solid rgba(0,0,0,0.12);
            border-radius: 6px;
            background: #fff;
            color: #000;
            outline: none;
            cursor: pointer;
        }

        @media (max-width: 768px) {
            /* Smaller nav */
            nav { height: 68px !important; padding: 0 5%; }

            /* Adjust all nav-height-dependent positions */
            #docs-wrapper {
                grid-template-columns: 1fr;
                width: 100%;
                max-width: none;
                margin-top: 68px;
            }
            #docs-sidebar { display: none; }
            #docs-visual { display: none; }
            #docs-content {
                padding: 28px 20px 60px;
                max-width: 100%;
                min-width: 0;        /* critical: lets grid child shrink below content size */
                border-right: none;
                overflow-x: hidden;  /* clip any stray overflow from children */
            }
            #mobile-nav { display: block; }
            #scroll-tracker { display: none; }

            /* Reduce section heading size */
            .section-title { font-size: 22px; }

            /* Paragraphs and notes: prevent long words / inline code from overflowing */
            .section-desc {
                max-width: 100%;
                font-size: 13px;
                overflow-wrap: break-word;
                word-break: break-word;
            }
            .doc-note {
                overflow-wrap: break-word;
                word-break: break-word;
            }
            .section-desc code,
            .doc-note code,
            .doc-section p code {
                word-break: break-all;
                overflow-wrap: anywhere;
            }

            /* Tables: scroll horizontally only if necessary */
            .params-table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                font-size: 17px;
            }
            /* On mobile, description column wraps — override the nowrap on fixed cols */
            .params-table td:first-child,
            .params-table th:first-child { width: 120px; }
            .params-table td:nth-child(2),
            .params-table th:nth-child(2) { width: 90px; }
            .params-table td:nth-child(3):not(:last-child),
            .params-table th:nth-child(3):not(:last-child) { width: 60px; }
            .params-table.event-types-table td:first-child,
            .params-table.event-types-table th:first-child { width: 150px; }
            .params-table.event-types-table td:nth-child(2),
            .params-table.event-types-table th:nth-child(2) { width: 110px; }
            .params-table.event-types-table td:nth-child(3):not(:last-child),
            .params-table.event-types-table th:nth-child(3):not(:last-child) { width: 360px; }
            .params-table.event-types-table td:nth-child(4),
            .params-table.event-types-table th:nth-child(4) { width: 120px; }
            .params-table.contract-table td:first-child,
            .params-table.contract-table th:first-child { width: 210px; }
            .params-table.contract-table td:nth-child(2),
            .params-table.contract-table th:nth-child(2) { width: 92px; }
            .params-table.contract-table td:nth-child(3),
            .params-table.contract-table th:nth-child(3),
            .params-table.contract-table td:nth-child(4),
            .params-table.contract-table th:nth-child(4) { width: 220px; }
            .params-table.contract-table td:nth-child(5),
            .params-table.contract-table th:nth-child(5) { width: 320px; }

            /* Endpoint rows: allow wrapping */
            .endpoint-row { column-gap: 8px; row-gap: 4px; }
            .endpoint-desc { margin-left: 0; }
            .endpoint-path { overflow-wrap: break-word; word-break: break-all; }

            /* Code blocks — keep examples readable without crowding the edges */
            .code-block { font-size: 13px; padding: 12px 14px; }
            .response-drawer .code-block { font-size: 13px; padding: 12px 14px; }
            .api-index-grid { grid-template-columns: 1fr; }

            /* Quickstart steps: stack vertically */
            .qs-step { flex-direction: column; gap: 8px; }
            .qs-step-num { font-size: 16px; opacity: 0.3; }
        }

        @media (max-width: 420px) {
            #docs-content { padding: 20px 16px 60px; }
            .code-block { font-size: 12px; padding: 12px 14px; }

            /* On very narrow screens, hide the Required column (3rd) to fit
               Field + Type + Description in the available width */
            .params-table:not(.event-types-table):not(.contract-table) th:nth-child(3),
            .params-table:not(.event-types-table):not(.contract-table) td:nth-child(3) { display: none; }
            .params-table { font-size: 16px; }
        }

.api-files-labels-s-001 { margin-top:16px }
.api-files-labels-s-002 { margin: 6px 0 0 0; padding-left: 1.25em; line-height: 1.8; }
