/* Connector Catalog. Tokens on :root; dark mode follows the system unless the toggle chose a theme. */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f4f4f7;
  --fg: #16161d;
  --fg-2: #4a4a57;
  --muted: #7a7a88;
  --line: #e7e7ee;
  --line-2: #d9d9e3;
  --accent: #4f46e5;
  --accent-2: #eef0ff;
  --accent-fg: #ffffff;
  --code-bg: #0f1020;
  --code-fg: #e6e6f0;
  --code-muted: #8b8ba7;
  --ok: #0f8a4a; --ok-bg: #e7f7ee;
  --warn: #9a5b00; --warn-bg: #fff4e0;
  --bad: #c0262d; --bad-bg: #fdecec;
  --info: #1f6fd1; --info-bg: #e8f1fd;
  --shadow: 0 1px 2px rgba(16, 16, 40, .04), 0 4px 16px rgba(16, 16, 40, .05);
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b12; --surface: #12121c; --surface-2: #191926; --fg: #ececf3; --fg-2: #b8b8c8; --muted: #8585a0;
    --line: #23232f; --line-2: #2e2e3d; --accent: #8b85ff; --accent-2: #1c1b3a; --accent-fg: #0b0b12;
    --code-bg: #161624; --code-fg: #e6e6f0; --code-muted: #7d7d99;
    --ok: #4ade80; --ok-bg: #0f2a1c; --warn: #fbbf24; --warn-bg: #2b2210; --bad: #f87171; --bad-bg: #2e1214; --info: #60a5fa; --info-bg: #0f1d33;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b12; --surface: #12121c; --surface-2: #191926; --fg: #ececf3; --fg-2: #b8b8c8; --muted: #8585a0;
  --line: #23232f; --line-2: #2e2e3d; --accent: #8b85ff; --accent-2: #1c1b3a; --accent-fg: #0b0b12;
  --code-bg: #161624; --code-fg: #e6e6f0; --code-muted: #7d7d99;
  --ok: #4ade80; --ok-bg: #0f2a1c; --warn: #fbbf24; --warn-bg: #2b2210; --bad: #f87171; --bad-bg: #2e1214; --info: #60a5fa; --info-bg: #0f1d33;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: var(--mono); font-size: 13px; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand svg rect { fill: var(--accent); stroke: none; }
.brand svg path { stroke: #fff; stroke-width: 2.5; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--fg-2); padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.topnav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.topnav a.active { color: var(--fg); background: var(--surface-2); }
.ext { color: var(--muted); font-size: 12px; }
.search { position: relative; margin-left: auto; width: min(380px, 40vw); }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 36px; padding: 0 34px 0 34px; background: var(--surface); color: var(--fg); border: 1px solid var(--line-2); border-radius: 9px; font: inherit; font-size: 14px; outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 6px; font-size: 11px; background: var(--surface-2); }
.results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); max-height: 420px; overflow-y: auto; padding: 6px; }
.results a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--fg); }
.results a:hover, .results a.on { background: var(--accent-2); text-decoration: none; }
.results .r-sub { color: var(--muted); font-size: 12.5px; margin-left: auto; white-space: nowrap; }
.results .empty { padding: 12px; color: var(--muted); font-size: 14px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); border-radius: 9px; color: var(--fg-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .icon-btn .sun { display: none; } :root:not([data-theme]) .icon-btn .moon { display: block; } }

.app { max-width: 1240px; margin: 0 auto; padding: 0 20px 80px; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* ---------- common ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.accent { background: var(--accent-2); color: var(--accent); border-color: transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.mono { font-family: var(--mono); font-weight: 500; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 16px 0; border: 1px solid transparent; }
.callout.warn { background: var(--warn-bg); color: var(--warn); }
.callout.bad { background: var(--bad-bg); color: var(--bad); }
.callout.info { background: var(--info-bg); color: var(--info); }
.callout b { font-weight: 650; }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.logo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.logo.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.logo { position: relative; }
.logo > img { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 12%; object-fit: contain; background: #fff; border: 1px solid #e2e8f0; border-radius: inherit; }

/* ---------- home ---------- */
.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(30px, 4vw, 42px); margin: 0 0 10px; font-weight: 720; }
.hero p { margin: 0; max-width: 640px; color: var(--fg-2); font-size: 17px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 18px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.card:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card-head .mono { font-size: 12.5px; color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card-foot { display: flex; gap: 18px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--fg-2); font-size: 13.5px; }
.card-foot b { color: var(--fg); }
.card.failed { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); box-shadow: none; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------- connector pages ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; padding: 22px 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.c-head { display: flex; align-items: center; gap: 16px; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.c-head h1 { margin: 0; font-size: 28px; font-weight: 720; }
.c-head .card-meta { margin-top: 8px; }
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 28px; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; padding-bottom: 20px; }
.side h4 { margin: 18px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.side h4:first-child { margin-top: 0; }
.side a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; margin: 1px 0; border-radius: 7px; color: var(--fg-2); }
.side a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.side a.on { background: var(--accent-2); color: var(--accent); font-weight: 560; }
.side .k { margin-left: auto; font-size: 11px; color: var(--muted); }
.content { min-width: 0; max-width: 860px; }
.content h2 { font-size: 22px; margin: 0 0 6px; }
.content h3 { font-size: 16px; margin: 34px 0 10px; }
.content .lead { color: var(--fg-2); margin: 4px 0 18px; font-size: 16px; }
.content p { margin: 0 0 12px; }
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.endpoint { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: 16px 0; font-family: var(--mono); font-size: 13.5px; overflow-x: auto; }
.method { flex: none; font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 5px; background: var(--ok-bg); color: var(--ok); }
.method.put { background: var(--warn-bg); color: var(--warn); }
.endpoint .path { white-space: nowrap; }
.endpoint .copy { margin-left: auto; }
.list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.list a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--fg); }
.list a:first-child { border-top: 0; }
.list a:hover { background: var(--surface-2); text-decoration: none; }
.list .l-main { min-width: 0; }
.list .l-title { font-weight: 580; }
.list .l-desc { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .l-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.list .arrow { color: var(--muted); }

/* schema tables */
.schema { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.field { padding: 12px 16px; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; }
.field-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.field-name { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.field-type { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.req { font-size: 11px; font-weight: 650; color: var(--warn); text-transform: uppercase; letter-spacing: .04em; }
.field-desc { color: var(--fg-2); font-size: 14px; margin-top: 3px; }
.field-extra { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.field-extra code { font-size: 12px; }
.nested { margin: 10px 0 2px 2px; padding-left: 14px; border-left: 2px solid var(--line); }
.nested .field { padding: 8px 0; border-top: 0; }
.schema-empty { padding: 14px 16px; color: var(--muted); font-size: 14px; }

/* code */
.code { position: relative; margin: 12px 0 18px; background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: var(--code-muted); font-family: var(--sans); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; line-height: 1.55; }
.copy { margin-left: auto; height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: var(--code-muted); font: inherit; font-size: 12px; cursor: pointer; }
.copy:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.endpoint .copy { border-color: var(--line-2); color: var(--muted); }
.endpoint .copy:hover { color: var(--fg); border-color: var(--muted); }
.tok-k { color: #c4b5fd; } .tok-p { color: #a5b4fc; } .tok-s { color: #86efac; } .tok-n { color: #fcd34d; } .tok-c { color: var(--code-muted); font-style: italic; }
.tok-f { color: #7dd3fc; } .tok-v { color: #f9a8d4; } .tok-o { color: #fdba74; } .tok-t { color: #5eead4; }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 40px; margin-bottom: 8px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-2); color: var(--accent); font-weight: 700; font-size: 13px; }
.step h3 { margin: 2px 0 6px !important; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; font-size: 14px; }
.kv > div { padding: 10px 14px; border-top: 1px solid var(--line); }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv > div:nth-child(odd) { color: var(--muted); background: var(--surface-2); }
.prose h2 { font-size: 18px; margin: 28px 0 8px; }
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose ul { padding-left: 20px; margin: 6px 0 12px; }
.auth-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.auth-card h3 { margin: 0 0 4px !important; display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 0; }
.tabs button { padding: 9px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 560; }
.notfound { padding: 80px 0; text-align: center; }
.notfound h1 { font-size: 28px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; font-weight: 560; cursor: pointer; white-space: nowrap; transition: border-color .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--fg)); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn .ext { margin-left: -2px; }
.link-btn { border: 0; background: none; padding: 0; margin-left: 6px; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.gi { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-2); color: var(--accent); }
.gi svg { width: 20px; height: 20px; }

/* small-screen menu */
.menu-btn { display: none; }
.mnav { position: absolute; top: 64px; left: 16px; right: 16px; z-index: 30; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); }
.mnav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--fg); font-size: 15px; }
.mnav a:hover, .mnav a.active { background: var(--surface-2); text-decoration: none; }

/* connector page header */
.c-title { min-width: 0; }
.c-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- code blocks in the docs: language label, tabs ---------- */
.code-lang { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.code-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tab { flex: none; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--code-muted); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.code-tab:hover { color: var(--code-fg); }
.code-tab.on { color: #fff; background: rgba(255, 255, 255, .09); }
.code-tab:focus-visible, .copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.md-code .code-head { min-height: 42px; padding: 6px 8px 6px 14px; }
/* Long lines wrap rather than hide behind a horizontal scroll; Copy still copies the code as written. */
.md-code pre { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.md-code-pre pre { white-space: pre; overflow-wrap: normal; }

/* ---------- Markdown ---------- */
.md { font-size: 15.5px; line-height: 1.72; overflow-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 14px; }
.md h1, .md h2, .md h3, .md h4 { position: relative; scroll-margin-top: 84px; letter-spacing: -0.012em; }
.md h1 { font-size: 28px; margin: 40px 0 14px; }
.md h2 { font-size: 22px; margin: 46px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.md > h2:first-child { border-top: 0; padding-top: 0; }
.md h3 { font-size: 17px; margin: 32px 0 8px; }
.md h4 { font-size: 15px; margin: 24px 0 6px; }
.md .anchor { position: absolute; left: -22px; width: 22px; padding-right: 6px; text-align: right; color: var(--muted); font-weight: 500; opacity: 0; transition: opacity .1s ease; }
.md .anchor:hover { color: var(--accent); text-decoration: none; }
.md h1:hover .anchor, .md h2:hover .anchor, .md h3:hover .anchor, .md h4:hover .anchor, .md .anchor:focus-visible { opacity: 1; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 24px; }
.md li { margin: 5px 0; padding-left: 2px; }
.md li > p { margin: 0 0 8px; }
.md li > ul, .md li > ol { margin: 6px 0 4px; }
.md li::marker { color: var(--muted); }
.md ol > li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.md img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.md strong { font-weight: 650; }
.md a code { color: inherit; }
.md :not(pre) > code { font-size: 0.85em; }
.md .code { margin: 14px 0 22px; }
.md.compact h2 { font-size: 18px; margin: 30px 0 8px; padding-top: 0; border-top: 0; }
.md.compact h3 { font-size: 15px; margin: 18px 0 6px; }

.md-table {
  margin: 16px 0 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px;
  /* A table wider than its box scrolls; a shade at the edge says there is more (it shows only while there is). */
  --shade: color-mix(in srgb, var(--fg) 30%, transparent);
  background:
    linear-gradient(to right, var(--surface) 40%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 40%, transparent) right / 36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--shade), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--shade), transparent) right / 14px 100% no-repeat scroll,
    var(--surface);
}
.md-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.md-table th { background: color-mix(in srgb, var(--fg) 4%, transparent); color: var(--fg); font-weight: 620; text-align: left; white-space: nowrap; }
.md-table th, .md-table td { padding: 9px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.md-table thead th { border-top: 0; }
.md-table td { color: var(--fg-2); }
.md-table td:first-child { color: var(--fg); }

.md-callout { --c: var(--info); --c-bg: var(--info-bg); margin: 18px 0 22px; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-left: 3px solid var(--c); border-radius: 10px; background: var(--c-bg); font-size: 14.5px; line-height: 1.65; }
.md-callout.ok { --c: var(--ok); --c-bg: var(--ok-bg); }
.md-callout.warn { --c: var(--warn); --c-bg: var(--warn-bg); }
.md-callout.bad { --c: var(--bad); --c-bg: var(--bad-bg); }
.md-callout.accent { --c: var(--accent); --c-bg: var(--accent-2); }
.md-callout.plain { --c: var(--line-2); --c-bg: var(--surface-2); border-color: var(--line); border-left-color: var(--accent); }
.md-callout-title { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--c); font-weight: 650; font-size: 13.5px; }
.md-callout-title svg { width: 16px; height: 16px; }
.md-callout-body > :last-child { margin-bottom: 0; }
.md-callout-body p { margin-bottom: 8px; }
.md-callout .code { margin: 10px 0; }

/* ---------- docs: landing ---------- */
.docs-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 56px 0 30px; }
.docs-hero h1 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.1; margin: 0 0 14px; font-weight: 740; letter-spacing: -0.028em; }
.docs-hero p { margin: 0 0 24px; max-width: 560px; color: var(--fg-2); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-code { min-width: 0; }
.hero-code-title { font-size: 13px; font-weight: 600; margin: 0 0 8px 2px; color: var(--fg-2); }
.hero-code .code { margin: 0; box-shadow: var(--shadow); }
.docs-h2 { font-size: 20px; margin: 40px 0 16px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.guide-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease; }
.guide-card:hover { text-decoration: none; transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.guide-card .num { position: absolute; top: 20px; right: 20px; font: 600 12px var(--mono); color: var(--muted); }
.guide-card h3 { margin: 10px 0 0; font-size: 16.5px; }
.guide-card p { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.55; }
.guide-card .go { margin-top: auto; padding-top: 10px; color: var(--accent); font-size: 13.5px; font-weight: 560; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); }
.tool-card:hover { text-decoration: none; border-color: var(--line-2); background: var(--surface-2); }
.tool-card b { display: block; font-weight: 620; font-size: 14.5px; }
.tool-card b + span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- docs: a guide ---------- */
/* Narrow side columns leave the text column room for code and tables (about 756px at 1280). */
.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 180px; gap: 32px; padding-top: 28px; align-items: start; }
.docs-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; padding-bottom: 24px; }
.docs-side h4, .docs-toc h4 { margin: 20px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.docs-side h4:first-of-type { margin-top: 4px; }
.docs-side nav a { display: block; padding: 6px 10px; margin: 1px 0; border-radius: 7px; color: var(--fg-2); }
.docs-side nav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.docs-side nav a.on { background: var(--accent-2); color: var(--accent); font-weight: 560; }
.docs-side-toggle { display: none; }
.doc { min-width: 0; max-width: 860px; }
.doc-loading { padding: 60px 0; color: var(--muted); }
.doc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.doc-top .crumbs { padding: 0; }
.doc-tools { display: flex; gap: 6px; }
.doc-head { padding: 14px 0 24px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; margin: 0 0 10px; font-weight: 740; letter-spacing: -0.025em; }
.doc-head .lead { margin: 0; color: var(--fg-2); font-size: 17.5px; line-height: 1.6; }
.docs-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 13px; padding-bottom: 24px; }
.docs-toc h4 { margin-top: 4px; }
.docs-toc a, .toc-inline a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.45; }
.docs-toc a:hover, .toc-inline a:hover { color: var(--fg); text-decoration: none; }
.docs-toc a.l3, .toc-inline a.l3 { padding-left: 24px; }
.docs-toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 560; }
.toc-inline { display: none; margin: 0 0 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; }
.toc-inline summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--fg-2); }
.toc-inline nav { padding: 0 14px 12px; }
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.doc-pager a:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.doc-pager a.next { grid-column: 2; text-align: right; }
.doc-pager span { font-size: 12.5px; color: var(--muted); }
.doc-pager b { color: var(--accent); font-weight: 600; }

/* ---------- prompts for Claude ---------- */
.prompt { margin: 22px 0 26px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 14px; background: linear-gradient(180deg, var(--accent-2), var(--surface) 70%); box-shadow: var(--shadow); overflow: hidden; }
.prompt-head { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px 12px; }
.prompt-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); }
.prompt-icon svg { width: 19px; height: 19px; }
.prompt-titles { flex: 1; min-width: 0; }
.prompt-eyebrow { display: block; font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.prompt-title { margin-top: 2px; font-size: 16.5px; font-weight: 650; line-height: 1.35; color: var(--fg); }
.prompt-sub { margin: 4px 0 0 !important; color: var(--fg-2); font-size: 13.5px; line-height: 1.5; }
.prompt-copy { flex: none; }
.prompt-fields { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 0 18px 12px; }
.prompt-field { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); font-weight: 560; }
.prompt-field input { height: 32px; width: 200px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--fg); font: 13px var(--mono); outline: none; }
.prompt-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.prompt-body { position: relative; border-top: 1px solid var(--line); background: var(--surface); }
.prompt-body pre { margin: 0; padding: 14px 18px; font: 12.5px/1.6 var(--mono); color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
.prompt-body.clipped pre { max-height: 236px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.prompt-more { display: block; width: 100%; padding: 9px 18px; border: 0; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.prompt-more:hover { background: var(--accent-2); }
.prompt-more:focus-visible, .prompt-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ph { padding: 0 4px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.by-hand { display: flex; align-items: center; gap: 12px; margin: 30px 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.by-hand::before, .by-hand::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.hero-prompt { min-width: 0; }
.hero-prompt .prompt { margin: 0; }

/* collapsed blocks in the guides */
.md-details { margin: 16px 0 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.md-details > summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--fg-2); font-size: 14.5px; }
.md-details > summary:hover { color: var(--fg); }
.md-details[open] > summary { border-bottom: 1px solid var(--line); }
.md-details-body { padding: 12px 14px 2px; }
.md-details-body > :first-child { margin-top: 0; }

/* catalog: filters for connectors with many operations */
.side-filter { margin: 6px 0 2px; }
.side-filter input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; outline: none; }
.side-filter input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.side-hits { margin-top: 4px; }
.side-none { padding: 6px 10px; color: var(--muted); font-size: 13px; }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 18px; }
.filter-box { position: relative; flex: 1 1 320px; display: block; }
.filter-box svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.filter-box input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; outline: none; }
.filter-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.list-tools .count { color: var(--muted); font-size: 13.5px; }
.item-group { margin-bottom: 18px; }
.item-group h3 { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px !important; font-size: 14px !important; color: var(--fg-2); }
.item-group h3 .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.list a[hidden], .item-group[hidden] { display: none; }
.content .more { margin-top: 10px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 0 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
  .side h4 { display: none; }
  .side a { white-space: nowrap; border: 1px solid var(--line); }
  .side .k { display: none; }
  .side-filter { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; padding: 0 16px; }
  .search { width: auto; flex: 1; }
  .search kbd { display: none; }
  .app { padding: 0 16px 60px; }
  .kv { grid-template-columns: 1fr; }
  .kv > div:nth-child(odd) { border-top: 1px solid var(--line); }
  .kv > div:first-child { border-top: 0; }
  .kv > div:nth-child(2) { border-top: 0; }
  .card-foot { gap: 12px; flex-wrap: wrap; }
}

/* ---------- docs and the top bar on narrower screens ---------- */
@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .docs-toc { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 900px) {
  .docs-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; }
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .docs-side { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 18px; }
  .docs-side-toggle { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; font-weight: 560; cursor: pointer; }
  .docs-side-toggle svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
  .docs-side-toggle span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .docs-side.open .docs-side-toggle svg:last-child { transform: rotate(180deg); }
  .docs-side nav { display: none; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .docs-side.open nav { display: block; }
  .docs-side nav h4 { margin: 12px 10px 4px; }
  .md .anchor { display: none; }
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 640px) {
  .c-head { flex-wrap: wrap; }
  .c-actions { margin-left: 0; width: 100%; }
  .docs-hero h1 { font-size: 32px; }
  .docs-hero p { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .guide-grid, .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-head h1 { font-size: 28px; }
  .doc-head .lead { font-size: 16px; }
  .md { font-size: 15px; }
  .md h2 { font-size: 20px; margin-top: 38px; }
  .md-code pre { font-size: 12.5px; }
  /* Phones: narrow tables fit by wrapping anywhere; tables of four or more columns keep their width and scroll. */
  .md-table th { white-space: normal; }
  .md-table td { overflow-wrap: anywhere; }
  .md-table.wide table { min-width: 600px; }
  .md-table.wide td { overflow-wrap: break-word; }
  .doc-pager { grid-template-columns: minmax(0, 1fr); }
  .doc-pager a.next { grid-column: 1; }
  .prompt-head { flex-wrap: wrap; padding: 14px 14px 10px; gap: 10px 12px; }
  .prompt-titles { flex-basis: calc(100% - 50px); }
  .prompt-copy { width: 100%; justify-content: center; }
  .prompt-fields { padding: 0 14px 10px; }
  .prompt-field { flex: 1 1 100%; }
  .prompt-field input { flex: 1; width: auto; }
  .prompt-body pre { padding: 12px 14px; font-size: 12px; }
}
/* The prompt card keeps its own type sizes inside the docs hero. */
.prompt p.prompt-sub { margin: 4px 0 0; max-width: none; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); }
.docs-side nav .docs-home + h4 { margin-top: 14px; }
/* Long paths in running text wrap on phones instead of widening the page. */
.content p code, .content .lead code, .md p code, .md li code, .md td code { overflow-wrap: anywhere; }
