/* Integrations and API docs pages. Tokens come from site.css. */
.page { padding-top: 56px; padding-bottom: 112px; }
.page-intro { max-width: 720px; }
.page-intro h1, .docs-body h1 { font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.4rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.04; }
.page-intro .lead { max-width: 56ch; }

.plug-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.plug { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 14px; }
.plug-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plug h2 { font-size: 1.35rem; max-width: none; }
.plug-ver { font-size: .82rem; font-weight: 500; color: var(--muted); background: var(--sunk); padding: 3px 10px; border-radius: 999px; }
.plug p { color: var(--muted); }
.plug .btn { justify-self: start; }
.plug details { border-top: 1px solid var(--line); padding-top: 12px; }
.plug summary { cursor: pointer; font-weight: 500; color: var(--action); list-style: none; }
.plug summary::-webkit-details-marker { display: none; }
.plug summary::after { content: " +"; }
.plug details[open] summary::after { content: " -"; }
.plug ol { margin: 12px 0 0; padding-left: 20px; list-style: decimal; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
code { font-family: var(--mono); font-size: .88em; background: var(--sunk); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

.own { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 40px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.own h2 { font-size: 1.6rem; }
.own p { margin-top: 10px; color: var(--muted); max-width: 60ch; }

/* API docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 112px; align-items: start; }
.docs-nav { position: sticky; top: 96px; max-height: calc(100dvh - 120px); overflow: auto; }
.docs-nav-h { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.docs-nav ol { display: grid; gap: 2px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .93rem; }
.docs-nav a:hover, .docs-nav a.on { color: var(--ink); background: var(--sunk); }
.docs-body { min-width: 0; max-width: 860px; }
.docs-body .lead { max-width: 64ch; }
.docs-body section { padding-top: 48px; scroll-margin-top: 88px; }
.docs-body h2 { font-size: 1.7rem; max-width: none; margin-bottom: 14px; }
.docs-body p { margin: 12px 0; color: var(--ink); line-height: 1.7; }
.bul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.steps-doc { list-style: decimal; padding-left: 22px; display: grid; gap: 10px; }
.ep { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.ep code { font-size: .95rem; }
.m { font-family: var(--mono); font-size: .76rem; font-weight: 500; padding: 3px 8px; border-radius: 6px; color: #fff; }
.m.get { background: #08795A; }
.m.post { background: var(--action); }

.code { margin: 16px 0; border-radius: 14px; overflow: hidden; background: #0D1428; border: 1px solid #1F2A45; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #111A33; color: #9CA6BF; font-size: .8rem; font-weight: 500; }
.code-copy { border: 1px solid #33406A; background: transparent; color: #C9D3EA; border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; }
.code-copy:hover { border-color: #6F8BFF; color: #fff; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { background: none; padding: 0; color: #E3E8F5; font-size: .84rem; line-height: 1.65; white-space: pre; overflow-wrap: normal; }

.tbl { margin: 16px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-weight: 600; background: var(--sunk); padding: 10px 14px; white-space: nowrap; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.tbl td:first-child { color: var(--ink); white-space: nowrap; }

@media (max-width: 920px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-nav { position: static; max-height: none; }
  .docs-nav ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-nav a { background: var(--sunk); padding: 5px 10px; font-size: .85rem; }
}
@media (max-width: 640px) {
  .page { padding-top: 32px; padding-bottom: 72px; }
  .plug { padding: 22px; }
  .own { padding: 28px 22px; }
  .tbl td:first-child { white-space: normal; }
}
.dl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl span { font-family: var(--mono); font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
