/* Collabiro developer docs and SEO pages. Loaded after site.css; uses its colour tokens. */
:root { --code-bg: #0e1730; --code-ink: #e6ebf5; --code-head: #15203d; --get: #12b886; --post: #0b5cff; }
:root[data-theme="dark"] { --code-bg: #070d1d; --code-head: #0e1730; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --code-bg: #070d1d; --code-head: #0e1730; } }

/* Layout: sidebar, article, on-this-page */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) 200px; gap: 48px; align-items: start; padding: 36px 0 96px; }
.docs-side, .docs-toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.docs-side-toggle { display: none; }
.docs-group { margin-bottom: 22px; }
.docs-group h4, .docs-toc h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 8px; }
.docs-group ul, .docs-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.docs-group a, .docs-toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .93rem; line-height: 1.35; }
.docs-group a:hover, .docs-toc a:hover { background: var(--bg-3); color: var(--ink); }
.docs-group a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.docs-toc a { font-size: .86rem; padding: 4px 10px; border-left: 2px solid var(--line); border-radius: 0; }
.docs-toc a.active { border-left-color: var(--accent); color: var(--ink); }
.docs-toc:has(ol:empty) { display: none; }

.docs-body { min-width: 0; }
.docs-body .crumbs { margin-bottom: 14px; }
.docs-body h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-bottom: .3em; }
.docs-body > .lead { margin-bottom: 28px; }
.docs-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 52px 0 14px; padding-top: 8px; scroll-margin-top: 90px; }
.docs-body h3 { font-size: 1.08rem; margin: 26px 0 10px; scroll-margin-top: 90px; }
.docs-body p, .docs-body li { font-size: 1rem; }
.docs-body a { color: var(--accent); text-underline-offset: 2px; }
.docs-body code { font: 500 .88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.docs-list, .steps-list, .prompt-list { padding-left: 1.3em; display: grid; gap: 8px; margin: 0 0 1.2em; color: var(--ink-2); }
.steps-list > li { padding-left: 4px; }
.docs-list > li, .steps-list > li, .prompt-list > li { min-width: 0; }
.steps-list > li::marker { font-weight: 700; color: var(--accent); }
.prompt-list { list-style: none; padding: 0; }
.prompt-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.docs-updated { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-3); }

.docs-meta { display: grid; gap: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 0 0 8px; }
.docs-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: .95rem; color: var(--ink-2); }
.docs-meta span { font-weight: 600; color: var(--ink); }

/* Cards */
.docs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 12px; }
.docs-card { display: block; text-decoration: none; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow); transition: transform .15s, border-color .2s; }
.docs-body .docs-card { color: var(--ink); }
.docs-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.docs-card .ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.docs-card h3 { margin: 0 0 6px; }
.docs-card p { font-size: .93rem; margin: 0 0 10px; }
.docs-card .more { font-weight: 600; color: var(--accent); font-size: .92rem; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.client-card { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .15s; }
.docs-body .client-card { color: var(--ink); }
.client-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.client-card span { font-size: .86rem; color: var(--ink-3); }

/* Tables */
.docs-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--card); }
.docs-table th, .docs-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.docs-table th { color: var(--ink); font-weight: 600; background: var(--bg-3); white-space: nowrap; }
.docs-body .table-wrap, .compare-table { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; margin: 10px 0 18px; }
.docs-body .table-wrap .docs-table tr:last-child td { border-bottom: 0; }
.method { display: inline-block; min-width: 46px; text-align: center; font: 700 .72rem/1 ui-monospace, Menlo, Consolas, monospace; padding: 5px 7px; border-radius: 6px; color: #fff; letter-spacing: .04em; }
.method.get { background: var(--get); }
.method.post { background: var(--post); }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag.read { background: rgba(18, 184, 134, .14); color: var(--mint); }
.tag.write { background: rgba(255, 122, 69, .16); color: var(--coral); }

/* Endpoints */
.endpoint { border-top: 1px solid var(--line); margin-top: 40px; }
.endpoint h2 { margin-top: 32px; }
.ep-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ep-line code { font-size: .95rem; }

/* Callouts */
.callout { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--accent-soft); color: var(--ink-2); margin: 14px 0 18px; font-size: .95rem; }
.callout strong { color: var(--ink); }
.callout.warn { border-left-color: var(--coral); background: rgba(255, 122, 69, .1); }
.callout.tip { border-left-color: var(--mint); background: rgba(18, 184, 134, .1); }

/* Code */
.code { border-radius: 12px; overflow: hidden; background: var(--code-bg); margin: 10px 0 16px; border: 1px solid var(--line); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; background: var(--code-head); font-size: .78rem; color: #9aa6c2; font-weight: 600; }
.copy-btn { font: 600 .78rem/1 Inter, system-ui, sans-serif; color: #dbe3f3; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; padding: 6px 10px; cursor: pointer; }
.copy-btn:hover { background: rgba(255, 255, 255, .16); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.docs-body .code code, .code code { background: none; border: 0; padding: 0; color: var(--code-ink); font: 400 .85rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-wrap: normal; }
.steps-list .code { margin-top: 10px; }

/* Tabs */
.tabs { margin: 10px 0 16px; }
.tab-list { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.tab-list button { font: 600 .86rem/1 Inter, system-ui, sans-serif; color: var(--ink-3); background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0; padding: 9px 14px; cursor: pointer; }
.tab-list button[aria-selected="true"] { color: var(--ink); background: var(--code-head); border-color: var(--line); color: #fff; }
.tabs .code { margin-top: 0; border-top-left-radius: 0; }

/* FAQ inside docs */
.docs-faq details { background: var(--card); }

/* SEO pages */
.seo-prose { max-width: 760px; }
.seo-prose h2 { margin-top: 8px; }
.seo-prose .check-list { margin-top: 18px; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.compare-table td:first-child { color: var(--ink); font-weight: 600; }
.compare-table td:nth-child(2) { color: var(--ink); }
.compare-note { font-size: .86rem; color: var(--ink-3); max-width: 760px; margin: 8px auto 0; text-align: center; }
.cards .card h3 a { color: inherit; text-decoration: none; }
.cards .card h3 a:hover { color: var(--accent); }

@media (max-width: 1100px) {
  .docs { grid-template-columns: 210px minmax(0, 1fr); gap: 36px; }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .docs-side { position: static; max-height: none; overflow: visible; margin-bottom: 18px; }
  .docs-side-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; font: 600 .95rem/1 Inter, system-ui, sans-serif; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
  .docs-side-toggle::after { content: "▾"; color: var(--ink-3); }
  .docs-side-toggle[aria-expanded="true"]::after { content: "▴"; }
  .js .docs-nav { display: none; padding: 14px 4px 0; }
  .js .docs-side.open .docs-nav { display: block; }
  .docs-cards { grid-template-columns: 1fr; }
  .docs-meta div { grid-template-columns: 1fr; gap: 2px; }
  .docs-table th { white-space: normal; }
}
.docs-meta span.v { font-weight: 400; color: var(--ink-2); }
.docs-body .crumbs a { color: inherit; }
.docs-table td:first-child code { white-space: nowrap; overflow-wrap: normal; }

/* Footer with five columns (Product, Use cases, Developers, Get started) */
.foot-grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
@media (max-width: 960px) { .foot-grid { grid-template-columns: repeat(4, 1fr); } .foot-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
