/* Developer docs (/docs). Builds on site.css. */
.wrap.wide { max-width: 1320px; }
.logo-tag { font-size: 12px; font-weight: 600; color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border)); border-radius: 99px; padding: 1px 8px; }
.top nav a.current { color: var(--text); font-weight: 600; }

.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-page section { padding: 0; }

/* Sidebar */
.side { position: sticky; top: 62px; max-height: calc(100vh - 62px); overflow-y: auto; padding: 28px 4px 28px 0; }
.side-toggle { display: none; }
.side-links { display: flex; flex-direction: column; }
.side-h { margin: 18px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-h:first-child { margin-top: 0; }
.side-links a { display: block; padding: 6px 12px; border-left: 2px solid var(--border); color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color .12s, border-color .12s; }
.side-links a:hover { color: var(--text); border-left-color: var(--muted); }
.side-links a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; background: color-mix(in srgb, var(--primary) 6%, transparent); }

@media (max-width: 960px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { position: sticky; top: 62px; z-index: 5; max-height: none; overflow: visible; padding: 0; margin: 0 -20px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
  .side-toggle { display: flex; width: 100%; align-items: center; gap: 8px; font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 12px 16px; cursor: pointer; text-align: left; }
  .side-toggle b { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-toggle::after { content: "▾"; color: var(--muted); transition: transform .2s; }
  .side-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  .side-links { display: none; max-height: 65vh; overflow-y: auto; padding: 4px 16px 16px; border-top: 1px solid var(--border); background: var(--bg); }
  .side.open .side-links { display: flex; }
}
@media (max-width: 600px) { .side { margin: 0 -16px; } }

/* Content */
.content { min-width: 0; padding: 36px 0 24px; }
.content > section { scroll-margin-top: 80px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--border); }
.content > section:last-of-type { border-bottom: 0; }
@media (max-width: 960px) { .content > section { scroll-margin-top: 120px; } }
.content h1 { font-size: clamp(30px, 4.4vw, 44px); margin-top: 6px; }
.content h2 { font-size: clamp(24px, 3vw, 30px); }
.content h3 { font-size: 18px; margin: 32px 0 10px; }
.content h4 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.content p, .content li { max-width: 78ch; }
.content p { margin: 0 0 14px; }
.small { font-size: 14px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); }
:not(pre) > code { background: var(--band); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .86em; overflow-wrap: anywhere; }
.table { margin: 14px 0 18px; }
td code, th code { white-space: normal; }

.doc-hero .lead { margin-bottom: 26px; }
.choose { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .choose { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .choose { grid-template-columns: 1fr; } }
.choose-card { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.choose-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary-2) 40%, var(--border)); }
.choose-card span:last-child { color: var(--muted); font-size: 13.5px; }
.ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 20px; font-weight: 800; margin-bottom: 8px; flex: none; }
.ico.react { background: #e6f7fd; color: #0a7ea4; }
.ico.next { background: #111827; color: #fff; }
.ico.rn { background: #eef2ff; }
.ico.ics { background: #fef2f2; }
@media (prefers-color-scheme: dark) {
  .ico.react { background: #0c2a35; color: #61dafb; }
  .ico.next { background: #eef1f5; color: #0b0f17; }
  .ico.rn { background: #1e2340; }
  .ico.ics { background: #3a1616; }
}

.steps-list { padding-left: 22px; margin: 0 0 18px; }
.steps-list li { margin-bottom: 8px; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #10b981; font-weight: 700; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; align-items: start; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 .table, .grid-2 .code { margin: 0; }
.note-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.note-card p { margin: 0; color: var(--muted); font-size: 15px; }
.callout { margin: 18px 0 4px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--primary-2) 30%, var(--border)); background: color-mix(in srgb, var(--primary-2) 7%, var(--surface)); font-size: 15px; }

.flow { list-style: none; padding: 0; margin: 16px 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
@media (max-width: 800px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .flow { grid-template-columns: 1fr; } }
.flow li { counter-increment: f; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-size: 14px; color: var(--muted); }
.flow li b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.flow li b::before { content: counter(f) ". "; color: var(--primary); }

.int-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.int-head .ico { width: 48px; height: 48px; font-size: 24px; margin: 0; }
.int-head h2 { margin: 0; }
.int-head p { margin: 0; }
.integration .eyebrow { margin-bottom: 6px; }

/* Code blocks */
.content .code { border-radius: 12px; margin: 12px 0 16px; overflow: hidden; border: 1px solid var(--code-bg); }
.tabset .code { border-top-left-radius: 0; margin-top: 0; }
.tabset { margin: 14px 0 18px; }
.tabset .tabs { margin-top: 0; flex-wrap: wrap; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 8px 16px; background: color-mix(in srgb, var(--code-bg) 85%, #fff 15%); color: #cbd5e1; font: 12.5px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-head .lang { text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; color: #94a3b8; margin-left: auto; }
.code-head .copy { position: static; }
.content .code pre { font-size: 13.5px; max-height: 560px; }
.code .tk-c { color: #7c8aa0; font-style: italic; }
.code .tk-s { color: #a5e3a1; }
.code .tk-k { color: #f59ab8; }
.code .tk-n { color: #fbbf77; }
.code .tk-t { color: #7dd3fc; }
.code .tk-p { color: #c4b5fd; }

.next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-bottom: 0 !important; }
@media (max-width: 760px) { .next-steps { grid-template-columns: minmax(0, 1fr); } }
.doc-foot { padding: 20px 0; }
