/* POSAPIs Docs — fixed sidebar + content / examples split */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --ink: #14181f;
    --ink-soft: #3a4252;
    --muted: #6b7385;
    --paper: #f4f1eb;
    --paper-card: #fffdf8;
    --line: rgba(20, 24, 31, 0.09);
    --accent: #c45c26;
    --accent-2: #e8a14a;
    --accent-soft: rgba(196, 92, 38, 0.12);
    --accent-glow: rgba(196, 92, 38, 0.32);
    --sidebar: #12171f;
    --code-bg: #131820;
    --code-elevated: #1a222d;
    --get: #1b9c6d;
    --post: #c45c26;
    --put: #2f7dd1;
    --delete: #d64545;
    --sidebar-w: 300px;
    --rail: 46%;
    --font: "Outfit", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", Consolas, monospace;
    --radius: 12px;
    --shadow: 0 14px 36px rgba(20, 24, 31, 0.07);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body,
body.hold-transition,
html {
    font-family: var(--font) !important;
    font-size: 15.5px !important;
    color: var(--ink) !important;
    background: var(--paper) !important;
    line-height: 1.55 !important;
    -webkit-font-smoothing: antialiased;
    margin: 0 !important;
    overflow-x: hidden !important;
}

/* ===== Fixed sidebar ===== */
.tocify-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 40 !important;
    width: var(--sidebar-w) !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background:
        radial-gradient(800px 420px at -20% -10%, rgba(196, 92, 38, 0.28), transparent 55%),
        linear-gradient(175deg, #1a2029 0%, #10151c 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    box-sizing: border-box !important;
}

.tocify-wrapper .logo {
    max-width: 40px !important;
    width: auto !important;
    margin: 1.1rem 1.1rem 0.15rem !important;
    padding: 0 !important;
    border-radius: 10px;
    box-shadow: 0 8px 22px var(--accent-glow);
}

.tocify-wrapper::before,
.tocify-wrapper::after {
    content: none !important;
    display: none !important;
}

.tocify-wrapper > a:first-of-type::after {
    content: none !important;
    display: none !important;
}

.docs-brand {
    padding: 0.15rem 1.1rem 0.85rem;
    margin: 0 0 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-brand-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1.2;
}

.docs-brand-sub {
    margin-top: 0.2rem;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
    font-weight: 500;
}

.tocify-wrapper .lang-selector {
    background: transparent !important;
    border: none !important;
    padding: 0.85rem 1rem !important;
    display: none !important;
    gap: 0.4rem !important;
    width: auto !important;
}

.tocify-wrapper .lang-selector button,
.dark-box .lang-selector button,
.page-wrapper .lang-selector button,
.lang-button {
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 999px !important;
    padding: 0.3rem 0.85rem !important;
    line-height: 1.4 !important;
    font-family: var(--font) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tocify-wrapper .lang-selector button.active,
.dark-box .lang-selector button.active,
.page-wrapper .lang-selector button.active,
.lang-button.active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.tocify-wrapper .search,
.tocify-wrapper > .search {
    background: transparent !important;
    border: none !important;
    padding: 0 1rem 0.9rem !important;
}

.tocify-wrapper .search input,
.tocify-wrapper input.search {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: 0.65rem 0.9rem !important;
    font-family: var(--font) !important;
}

.tocify-wrapper .search input::placeholder { color: rgba(255, 255, 255, 0.4); }

/* Kill default list bullets / underlines — clear, scannable nav */
.tocify-wrapper ul,
.tocify-wrapper li,
.tocify-wrapper .tocify-header,
.tocify-wrapper .tocify-subheader,
.tocify-wrapper .toc-footer {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.tocify-wrapper li::marker,
.tocify-wrapper li::before {
    content: none !important;
    display: none !important;
}

.tocify-wrapper a,
.tocify-wrapper .tocify-item > a,
.tocify-wrapper .toc-footer a {
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.tocify-wrapper .tocify-item,
.tocify-wrapper .tocify-item > a,
.tocify-wrapper .toc-footer li,
.tocify-wrapper .toc-footer a {
    color: rgba(255, 255, 255, 0.72) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
}

/* Top intro links */
.tocify-wrapper > #toc > .tocify-header > .tocify-item.level-1 > a {
    display: block !important;
    margin: 0.1rem 0.7rem !important;
    padding: 0.48rem 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.78) !important;
}

/* Resource group headers inside accordion — collection rows with icons */
.tocify-wrapper .tocify-item.level-1 > a,
.tocify-wrapper .tocify-item.level-1 > a.docs-collection-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    margin: 0.12rem 0.35rem !important;
    padding: 0.48rem 0.55rem !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: rgba(255, 255, 255, 0.86) !important;
    background: transparent !important;
}

.tocify-wrapper .tocify-item.level-1.tocify-focus > a,
.tocify-wrapper .tocify-item.level-1 > a:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.docs-collection-icon {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(140, 220, 210, 0.95);
}

.docs-collection-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.docs-collection-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.docs-section-toggle .docs-collection-icon {
    width: 1.05rem;
    height: 1.05rem;
    color: rgba(160, 230, 220, 0.95);
}

.docs-section-accordion[data-section="shop"] .docs-collection-icon {
    color: rgba(159, 212, 255, 0.95);
}

.docs-section-accordion[data-section="token"] .docs-collection-icon {
    color: rgba(226, 182, 255, 0.95);
}

.docs-section-accordion[data-section="application"] .docs-collection-icon {
    color: rgba(168, 230, 181, 0.95);
}

.docs-section-panel .tocify-header + .tocify-header {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.15rem;
    padding-top: 0.15rem;
}

/* Endpoint rows */
.tocify-wrapper .tocify-item.level-2 > a {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
    margin: 0.06rem 0.4rem !important;
    padding: 0.4rem 0.55rem !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: rgba(255, 255, 255, 0.78) !important;
    transition: background 0.12s ease, color 0.12s ease;
}

.tocify-wrapper .tocify-item {
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1.3 !important;
}

.tocify-wrapper .tocify-item.tocify-focus {
    background: transparent !important;
    box-shadow: none !important;
}

.tocify-wrapper .tocify-item.level-2.tocify-focus > a,
.tocify-wrapper .tocify-item.level-2 > a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.tocify-wrapper .tocify-subheader {
    border-left: 0 !important;
    margin: 0 0 0.35rem !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
}

.tocify-wrapper .tocify-subheader .tocify-item > a {
    padding-left: 0.55rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
}

/* Method chips injected by JS */
.docs-method-chip {
    flex: 0 0 auto;
    min-width: 2.35rem;
    text-align: center;
    font-family: var(--mono) !important;
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    line-height: 1.2 !important;
    border-radius: 4px;
    padding: 0.18rem 0.28rem;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
}

.docs-method-chip.is-get { background: var(--get) !important; }
.docs-method-chip.is-post { background: var(--post) !important; }
.docs-method-chip.is-put,
.docs-method-chip.is-patch { background: var(--put) !important; }
.docs-method-chip.is-delete { background: var(--delete) !important; }

.docs-endpoint-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
}

.tocify-wrapper .toc-footer {
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    opacity: 0.55;
}

.tocify-wrapper .toc-footer li,
.tocify-wrapper .toc-footer a {
    font-size: 0.72rem !important;
    padding: 0.2rem 1rem !important;
}

.tocify-wrapper .toc-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ===== Main column (scrolls with page; sidebar stays put) ===== */
.page-wrapper {
    margin-left: var(--sidebar-w) !important;
    position: relative !important;
    z-index: 10 !important;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 20% -15%, rgba(196, 92, 38, 0.07), transparent 50%),
        var(--paper) !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Persistent dark rail behind examples */
.page-wrapper .dark-box {
    width: var(--rail) !important;
    background:
        radial-gradient(700px 380px at 110% 0%, rgba(196, 92, 38, 0.2), transparent 55%),
        var(--code-bg) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 0 !important;
}

.page-wrapper .lang-selector {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 0.85rem 1.25rem 0 !important;
    width: var(--rail) !important;
    right: 0 !important;
    margin-left: auto !important;
    display: flex !important;
    gap: 0.4rem;
    justify-content: flex-end;
    box-sizing: border-box !important;
}

.content {
    position: relative !important;
    z-index: 30 !important;
    overflow: visible !important;
}

/*
 * Left docs column: descriptive content stays in (100% - rail)
 * and sits beside the floated right-rail example blocks.
 */
.content > aside,
.content > details,
.content > dl,
.content > h1,
.content > h2,
.content > h3,
.content > h4,
.content > h5,
.content > h6,
.content > ol,
.content > p,
.content > table,
.content > ul,
.content > form,
.content > form > aside,
.content > form > details,
.content > form > h1,
.content > form > h2,
.content > form > h3,
.content > form > h4,
.content > form > h5,
.content > form > h6,
.content > form > p,
.content > form > table,
.content > form > ul {
    margin-right: var(--rail) !important;
    padding-left: 2rem !important;
    padding-right: 1.75rem !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
    clear: none !important;
}

/* New endpoint starts on its own row (clear floats from previous examples) */
.content > h1,
.content > h2 {
    clear: both !important;
}

/* Do NOT clear forms — they must sit left of examples */
.content form {
    clear: none !important;
    display: block;
    width: auto;
}

.content h1 {
    font-family: var(--font) !important;
    font-weight: 700 !important;
    font-size: 1.9rem !important;
    letter-spacing: -0.02em;
    color: var(--ink) !important;
    background: none !important;
    border: none !important;
    margin: 2.25rem 0 0.85rem !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.content h1:first-child { margin-top: 1rem !important; }

.content h1::after {
    content: "";
    display: block;
    width: 3.25rem;
    height: 3px;
    margin-top: 0.65rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

.content h2 {
    font-family: var(--font) !important;
    font-weight: 650 !important;
    font-size: 1.28rem !important;
    letter-spacing: -0.015em;
    color: var(--ink) !important;
    background: none !important;
    border-top: 1px solid var(--line) !important;
    margin-top: 2.5rem !important;
    margin-bottom: 0.65rem !important;
    padding-top: 1.35rem !important;
    padding-bottom: 0.35rem !important;
}

.content h1 + h2,
.content h1 + div + h2 {
    margin-top: 1.25rem !important;
    border-top: none !important;
}

.content p,
.content li,
.content dd {
    color: var(--ink-soft) !important;
    text-shadow: none !important;
}

.content a {
    color: var(--accent) !important;
    text-decoration: none;
}

.content a:hover { text-decoration: underline; }

.content aside {
    background: var(--paper-card) !important;
    border: 1px solid var(--line) !important;
    border-left: 3px solid var(--accent) !important;
    border-radius: var(--radius) !important;
    text-shadow: none !important;
    box-shadow: var(--shadow);
    color: var(--ink-soft) !important;
}

.content code {
    font-family: var(--mono) !important;
    font-size: 0.86em !important;
    background: var(--accent-soft) !important;
    color: #9a4318 !important;
    border-radius: 6px !important;
    padding: 0.12em 0.4em !important;
}

.content b > code,
.content form b > code {
    background: transparent !important;
    color: var(--ink) !important;
    padding: 0 !important;
    font-size: 0.88rem !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.badge,
small.badge {
    font-family: var(--mono) !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    border-radius: 999px !important;
    padding: 0.28rem 0.62rem !important;
    text-shadow: none !important;
}

.badge-green,
.badge.badge-green,
.badge-get { background: var(--get) !important; color: #fff !important; }
.badge-black,
.badge.badge-black,
.badge-post { background: var(--post) !important; color: #fff !important; }
.badge-red,
.badge.badge-red,
.badge-delete { background: var(--delete) !important; color: #fff !important; }
.badge-blue,
.badge-put { background: var(--put) !important; color: #fff !important; }

.fancy-heading-panel,
h4.fancy-heading-panel {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background: var(--paper-card) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 0.7rem 1rem !important;
    color: var(--ink) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-sizing: border-box !important;
}

.content form .fancy-heading-panel,
.content form h4.fancy-heading-panel {
    margin-right: 0 !important;
}

.fancy-heading-panel + p {
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 0.85rem 1rem !important;
    box-sizing: border-box !important;
}

.content table {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.content table th {
    background: var(--ink) !important;
    color: #fff !important;
    border: none !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7rem 0.85rem !important;
}

.content table td {
    border: none !important;
    border-top: 1px solid var(--line) !important;
    color: var(--ink-soft) !important;
    background: transparent !important;
    padding: 0.7rem 0.85rem !important;
}

.content table tr:nth-child(odd) > td,
.content table tr:nth-child(even) > td {
    background: transparent !important;
}

.content table tr:nth-child(even) > td {
    background: rgba(20, 24, 31, 0.025) !important;
}

/* ===== Right-rail examples (beside related endpoint content) ===== */

/* Float whole example groups as one right-rail column unit */
.content > span[id^="example-"],
.content > span[id^="execution-"],
.content blockquote,
.content pre,
.content .annotation,
.content .bash-example,
.content .javascript-example {
    width: var(--rail) !important;
    float: right !important;
    clear: right !important;
    background: transparent !important;
    color: #e8edf5 !important;
    text-shadow: none !important;
    margin: 0 !important;
    padding: 0.55rem 1.25rem !important;
    box-sizing: border-box !important;
}

/* Nested pieces fill the floated group — avoid double-float / overflow */
.content > span[id^="example-"] > blockquote,
.content > span[id^="example-"] > pre,
.content > span[id^="example-"] > .bash-example,
.content > span[id^="example-"] > .javascript-example,
.content > span[id^="example-"] .annotation,
.content > span[id^="execution-"] > blockquote,
.content > span[id^="execution-"] > pre,
.content .bash-example,
.content .javascript-example,
.content .annotation,
.content .bash-example pre,
.content .javascript-example pre,
.content .annotation pre {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 0 0.75rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.content blockquote > p {
    background: var(--code-elevated) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 3px solid var(--accent) !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    padding: 0.65rem 0.85rem !important;
    text-shadow: none !important;
    margin: 0 0 0.55rem !important;
}

.content > span[id^="example-"] > blockquote,
.content blockquote {
    padding: 0.15rem 0 0.35rem !important;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.content pre {
    background: var(--code-elevated) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    margin: 0 0 0.75rem !important;
    padding: 1rem 1.1rem !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    overflow-x: auto !important;
    max-width: 100% !important;
}

.content pre > code,
.content pre code {
    font-family: var(--mono) !important;
    font-size: 0.8rem !important;
    line-height: 1.55 !important;
    color: #e8edf5 !important;
    background: transparent !important;
    text-shadow: none !important;
    white-space: pre !important;
}

.copy-btn,
button.copy-btn {
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: var(--font) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
    margin-top: 0.45rem !important;
    box-shadow: 0 8px 18px var(--accent-glow);
}

.content form button[type="button"],
.content form button[type="submit"] {
    font-family: var(--font) !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.45rem 0.85rem !important;
}

.content form input:not([type="hidden"]) {
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    padding: 0.35rem 0.55rem !important;
    font-family: var(--mono) !important;
    background: #fff !important;
    max-width: 100%;
}

.footer-button {
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 10px 24px var(--accent-glow) !important;
}

#nav-button span {
    background: var(--ink) !important;
    color: #fff !important;
    border-radius: 0 0 10px 0 !important;
}

/* Motions */
@keyframes docsFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.content > h1,
.content > h2,
.content > form {
    animation: docsFadeUp 0.35s ease both;
}

/* ===== Legacy AdminLTE shell (if used) ===== */
body.hold-transition .main-header.navbar {
    display: none !important;
}

body.hold-transition .wrapper {
    background: transparent !important;
    overflow: visible !important;
}

body.hold-transition .main-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--sidebar-w) !important;
    height: 100vh !important;
    overflow-y: auto !important;
    background:
        radial-gradient(800px 420px at -20% -10%, rgba(196, 92, 38, 0.28), transparent 55%),
        linear-gradient(175deg, #1a2029 0%, #10151c 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
}

body.hold-transition .brand-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
    padding: 1.15rem 1.2rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.hold-transition .brand-text {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    letter-spacing: 0.03em !important;
}

body.hold-transition .nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 10px !important;
    margin: 0.12rem 0.55rem !important;
    white-space: normal !important;
}

body.hold-transition .nav-sidebar .nav-link:hover,
body.hold-transition .nav-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

body.hold-transition .nav-sidebar .nav-link p {
    white-space: normal !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}

body.hold-transition .content-wrapper.page-wrapper,
body.hold-transition .page-wrapper.content-wrapper {
    margin-left: var(--sidebar-w) !important;
    background: transparent !important;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    :root {
        --sidebar-w: 220px;
        --rail: 42%;
    }
}

/*
 * Scribe's theme hides the sidebar under 930px — keep it fixed/visible
 * until a true phone breakpoint so the 3-pane layout works on tablets.
 */
@media (max-width: 930px) {
    .tocify-wrapper {
        left: 0 !important;
        width: var(--sidebar-w) !important;
    }

    .page-wrapper {
        margin-left: var(--sidebar-w) !important;
    }

    #nav-button {
        display: none !important;
    }

    #nav-button.open {
        left: var(--sidebar-w) !important;
    }
}

@media (max-width: 640px) {
    .tocify-wrapper {
        left: calc(var(--sidebar-w) * -1) !important;
    }

    .tocify-wrapper.open {
        left: 0 !important;
    }

    .page-wrapper {
        margin-left: 0 !important;
    }

    body.hold-transition .content-wrapper.page-wrapper,
    body.hold-transition .page-wrapper.content-wrapper {
        margin-left: 0 !important;
    }

    .tocify-wrapper .lang-selector {
        display: flex !important;
    }

    #nav-button {
        display: block !important;
    }

    .page-wrapper .dark-box {
        display: none !important;
    }

    .page-wrapper .lang-selector {
        width: 100% !important;
        position: sticky !important;
        background: var(--code-bg) !important;
        justify-content: flex-start;
        padding: 0.75rem 1rem !important;
    }

    .content > aside,
    .content > details,
    .content > dl,
    .content > h1,
    .content > h2,
    .content > h3,
    .content > h4,
    .content > h5,
    .content > h6,
    .content > ol,
    .content > p,
    .content > table,
    .content > ul,
    .content > form,
    .content > form > p,
    .content > form > h3,
    .content > form > table,
    .content > form > ul {
        margin-right: 0 !important;
        padding-left: 1.1rem !important;
        padding-right: 1.1rem !important;
    }

    .content > span[id^="example-"],
    .content > span[id^="execution-"],
    .content blockquote,
    .content pre,
    .content .annotation,
    .content .bash-example,
    .content .javascript-example,
    .fancy-heading-panel,
    .fancy-heading-panel + p {
        float: none !important;
        clear: none !important;
        width: auto !important;
        margin: 0 1.1rem 0.85rem !important;
        padding: 0 !important;
    }

    .content > span[id^="example-"] > blockquote,
    .content blockquote {
        color: var(--ink-soft) !important;
        text-transform: none;
        font-size: 0.9rem !important;
        letter-spacing: 0;
    }

    .content blockquote > p {
        background: var(--code-elevated) !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .content .bash-example pre,
    .content .javascript-example pre,
    .content pre {
        margin: 0 0 0.75rem !important;
        padding: 1rem !important;
    }
}

/* ===== Section accordions (Token / Application / Shop / V2) ===== */
.docs-section-accordion,
.docs-v2-accordion {
    margin: 0.45rem 0.65rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.docs-section-toggle,
.docs-v2-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 650;
    text-align: left;
    padding: 0.65rem 0.7rem;
    cursor: pointer;
}

.docs-section-toggle-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.docs-section-toggle:hover,
.docs-v2-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.docs-section-badge,
.docs-v2-badge {
    flex: 0 0 auto;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f0c27a;
    border: 1px solid rgba(240, 194, 122, 0.35);
    border-radius: 999px;
    padding: 0.14rem 0.4rem;
    white-space: nowrap;
}

.docs-section-accordion[data-section="shop"] .docs-section-badge {
    color: #9fd4ff;
    border-color: rgba(159, 212, 255, 0.35);
}

.docs-section-accordion[data-section="application"] .docs-section-badge {
    color: #a8e6b5;
    border-color: rgba(168, 230, 181, 0.35);
}

.docs-section-accordion[data-section="token"] .docs-section-badge {
    color: #e2b6ff;
    border-color: rgba(226, 182, 255, 0.35);
}

.docs-section-accordion.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.docs-section-accordion.is-disabled .docs-section-toggle {
    cursor: not-allowed;
}

.docs-section-accordion.is-disabled .docs-section-badge {
    color: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 255, 255, 0.15);
}

.docs-section-count {
    flex: 0 0 auto;
    font-size: 0.64rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 0.1rem 0.38rem;
    min-width: 1.35rem;
    text-align: center;
}

.docs-section-chevron,
.docs-v2-chevron {
    flex: 0 0 auto;
    margin-left: 0.15rem;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid rgba(255, 255, 255, 0.55);
    border-bottom: 2px solid rgba(255, 255, 255, 0.55);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.docs-section-accordion.is-open .docs-section-chevron,
.docs-v2-accordion.is-open .docs-v2-chevron {
    transform: rotate(-135deg);
}

.docs-section-panel,
.docs-v2-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0 0.45rem;
}

.docs-section-note,
.docs-v2-note {
    margin: 0.3rem 0.7rem 0.45rem !important;
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.docs-section-panel .tocify-header,
.docs-v2-panel .tocify-header {
    margin: 0;
}

.content .docs-section-content[hidden],
.content .docs-v2-content[hidden] {
    display: none !important;
}

/* Soften redundant top TOC items */
.tocify-wrapper .tocify-item[data-unique="posapis"],
.tocify-wrapper .tocify-item[data-unique="authenticating-requests"] {
    display: none !important;
}

/* Active sidebar search */
.tocify-wrapper .search input:focus {
    outline: none !important;
    border-color: rgba(196, 92, 38, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.18);
}

.tocify-wrapper.docs-searching .docs-section-note,
#toc.docs-searching ~ .docs-search-empty {
    display: block;
}

.docs-search-empty {
    margin: 0.35rem 1rem 1rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}

#toc.docs-searching .tocify-item.docs-search-hit > a {
    background: rgba(196, 92, 38, 0.16) !important;
    color: #fff !important;
}

#toc.docs-searching .docs-section-accordion {
    margin-bottom: 0.45rem;
}

/* Request JSON listing (query `data` or JSON body) */
.content form .docs-request-json-panel {
    margin-top: 0.85rem;
}

.content form .docs-request-json-note {
    margin: 0.35rem 0 0.55rem !important;
    font-size: 0.88rem !important;
    color: var(--muted) !important;
}

.content form .docs-request-json-pre,
.content form pre.docs-request-json-pre {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #14181f !important;
    border-radius: 12px !important;
    margin: 0 0 0.75rem !important;
}

.content form .docs-request-json-pre code,
.content form pre.docs-request-json-pre code {
    background: transparent !important;
    color: #e8edf5 !important;
    padding: 0 !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

.content .docs-request-json {
    margin: 0 0 0.85rem !important;
}
