/* Integrations: the connector index and the generated connector pages.
   Extends styles.css and platform.css; adds no new tokens, only the two
   shapes those files do not already carry: a layer chip and a prose column. */

/* ------------------------------------------------------------- chips */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--dim);
  background: rgba(255,255,255,.02); white-space: nowrap; vertical-align: middle;
}
.chip-account { color: #c9b8fb; border-color: #37305e; background: rgba(124,123,242,.07); }
.chip-brain   { color: #a5d8ff; border-color: #24405e; background: rgba(93,169,255,.07); }
.chip-cli     { color: #b9f0d8; border-color: #2b5347; background: rgba(52,211,153,.07); }
.chip-service { color: #f3d5a8; border-color: #4e3f26; background: rgba(226,170,86,.07); }
.chip-quiet {
  text-transform: none; letter-spacing: 0; font-family: var(--sans);
  font-size: 13.5px; white-space: normal; color: var(--dim);
}

/* --------------------------------------------------- connector index */
.cx { max-width: 1180px; margin: 46px auto 0; padding: 0 var(--edge); }
.cx-group { margin-top: 54px; }
.cx-group:first-child { margin-top: 0; }
.cx-head { margin-bottom: 20px; }
.cx-head h2 { margin-bottom: 10px; font-size: inherit; line-height: 1; }
.cx-head p { color: var(--dim); font-size: 15px; max-width: 640px; }
.cxcard { display: block; text-decoration: none; color: inherit; }
.cxcard h3 { font-size: 17.5px; font-weight: 600; margin-bottom: 9px; color: var(--txt); }
.cxcard p { color: var(--dim); font-size: 15px; }
.cxcard .go {
  display: inline-block; margin-top: 16px; font-family: var(--mono);
  font-size: 13px; color: var(--acc);
}

/* ---------------------------------------------------- connector page */
.doc-head .eyebrow a { color: var(--acc); text-decoration: none; }
.doc-chips {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  align-items: center; justify-content: center; margin-top: 22px;
}
.doc {
  max-width: 1180px; margin: 54px auto 0; padding: 0 var(--edge);
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px;
  align-items: start;
}
.doc-wide { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin-top: var(--sec); }
.doc-toc {
  position: sticky; top: 92px; display: flex; flex-direction: column; gap: 9px;
  border-left: 1px solid var(--line); padding-left: 16px;
}
.doc-toc a {
  color: var(--faint); text-decoration: none; font-size: 13.5px; line-height: 1.35;
}
@media (hover: hover) { .doc-toc a:hover { color: var(--acc); } }

.doc-body { min-width: 0; max-width: 760px; }
.doc-body h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 5.4vw, 33px);
  line-height: 1.15; margin: 52px 0 18px; scroll-margin-top: 92px;
}
.doc-body > *:first-child, .doc-body > div:first-child > h2:first-child { margin-top: 0; }
.doc-body h3 {
  font-size: 18px; font-weight: 600; margin: 34px 0 12px; color: var(--txt);
  scroll-margin-top: 92px;
}
.doc-body p { color: var(--dim); margin-bottom: 16px; }
.doc-body strong { color: var(--txt); font-weight: 600; }
.doc-body a { color: var(--acc); }
.doc-body ul, .doc-body ol { list-style: none; margin: 0 0 18px; display: flex; flex-direction: column; gap: 11px; }
.doc-body li { color: var(--dim); padding-left: 22px; position: relative; font-size: 15.5px; }
.doc-body ul > li::before { content: "\25B8"; position: absolute; left: 0; color: var(--acc); }
.doc-body ol { counter-reset: docstep; }
.doc-body ol > li { counter-increment: docstep; }
.doc-body ol > li::before {
  content: counter(docstep); position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--acc);
}
.doc-body blockquote {
  border-left: 2px solid var(--acc2); padding-left: 18px; margin: 0 0 18px;
}
.doc-body blockquote p { margin: 0; color: var(--txt); }
.doc-body code {
  font-family: var(--mono); font-size: .88em; color: #c8d0e2;
  background: rgba(124,123,242,.09); border: 1px solid #1d2439;
  border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere;
}
.doc-body pre {
  border: 1px solid #222b44; border-radius: 12px; background: #05070c;
  padding: 18px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
}
.doc-body pre code {
  background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.75;
  white-space: pre; overflow-wrap: normal; color: #c8d0e2;
}

/* tables scroll rather than forcing the page wide */
.tablewrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 22px;
  border: 1px solid var(--line); border-radius: 12px;
}
.doc-body table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 14.5px; }
.doc-body th, .doc-body td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top; color: var(--dim);
}
.doc-body th {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); background: rgba(255,255,255,.02);
  white-space: nowrap;
}
.doc-body tbody tr:last-child td { border-bottom: 0; }

.doc + .closing { margin-top: var(--sec); }

/* ------------------------------------------------------------ mobile */
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 40px; }
  .doc-toc {
    position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 10px;
    border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0;
  }
  .doc-toc a {
    border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
    font-size: 12.5px; color: var(--dim);
  }
}
@media (max-width: 760px) {
  .cx { margin-top: 34px; }
  .cx-group { margin-top: 42px; }
  .doc-body h2 { margin-top: 40px; }
  .doc-body pre { padding: 15px 14px; border-radius: 10px; }
  .doc-body pre code { font-size: 12px; }
  .doc-body li { font-size: 15px; }
  .doc-chips { margin-top: 18px; }
  .doc-body h2, .doc-body h3 { scroll-margin-top: 76px; }
  .doc-toc { top: 76px; }
}
