/* Emergent MCP Connector docs — monochrome "blueprint" identity.
   Brand-grounded: ink slate + white (matches the black-and-white logo), drafting/technical motifs. */
:root {
  --paper: #eff3f9;
  --surface: #ffffff;
  --ink: #0c1a2b;          /* deep slate ink (deepened brand-700 #222f3c) */
  --ink-soft: #16273d;
  --accent: #0c1a2b;        /* monochrome: accent IS ink */
  --accent-deep: #0c1a2b;
  --accent-tint: #eceff3;   /* light grey fill */
  --line: #dfe3e9;          /* hairline (light) */
  --line-strong: #c4cad3;
  --line-dark: rgba(255,255,255,0.16);  /* hairline on ink */
  --text: #0c1a2b;
  --text-2: #46566b;
  --text-3: #7d8a9c;

  --r-sm: 7px; --r-md: 11px; --r-lg: 16px;
  --sidebar: 244px; --maxw: 768px; --topbar: 58px;

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body { background: var(--paper); color: var(--text); font-family: var(--body);
  font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
/* prose links underlined for affordance (nav/buttons opt out below) */
.content p a, .content li a, footer a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.content p a:hover, .content li a:hover, footer a:hover { text-decoration-color: var(--ink); }

/* mono eyebrow — drawing annotation */
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center;
  gap: 20px; padding: 0 26px; background: rgba(255,255,255,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600;
  font-size: 16px; letter-spacing: -0.3px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; }
.brand .mark img { width: 26px; height: 26px; display: block; }
.brand .sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-3); font-weight: 500; }
.topbar .spacer { flex: 1; }
.topbar nav a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: var(--r-sm); }
.topbar nav a:hover { color: var(--ink); background: var(--paper); text-decoration: none; }
.topbar .cta { font-family: var(--body); background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 7px 15px; border-radius: var(--r-sm); }
.topbar .cta:hover { background: #1c2f47; text-decoration: none; }

/* shell */
.shell { display: flex; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.sidebar { width: var(--sidebar); flex: none; position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar)); overflow-y: auto; padding: 28px 16px 40px; }
.main { flex: 1; min-width: 0; display: flex; justify-content: center; padding: 40px 44px 120px; }
.content { width: 100%; max-width: var(--maxw); }

/* platform switch */
.switch { display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 4px; margin-bottom: 22px; }
.switch a { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 6px; border-radius: var(--r-sm); color: var(--text-2); }
.switch a:hover { color: var(--ink); text-decoration: none; }
.switch a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(12,26,43,0.08); }

.grouplabel { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3); margin: 18px 0 7px; padding: 0 10px; }
.nav { list-style: none; margin: 0; padding: 0; }
.nav a { display: block; color: var(--text-2); font-size: 14px; padding: 6px 10px; border-radius: var(--r-sm); border-left: 2px solid transparent; }
.nav a:hover { color: var(--ink); background: var(--paper); text-decoration: none; border-left-color: var(--accent); }

/* page header band — dark ink with blueprint grid */
.band { position: relative; overflow: hidden; background: var(--ink); color: #eaf1fb; border-radius: var(--r-lg);
  padding: 40px 38px; margin: 2px 0 30px;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 26px 26px; background-position: -1px -1px; background-color: var(--ink); }
.band .eyebrow { color: rgba(234,241,251,0.6); }
.band h1 { font-family: var(--display); font-size: 42px; line-height: 1.04; font-weight: 600; letter-spacing: -1.1px;
  color: #fff; margin: 0 0 12px; max-width: 17ch; }
.band p { color: rgba(234,241,251,0.74); font-size: 17px; margin: 0; max-width: 60ch; }
.band.hero h1 { font-size: 48px; }
.band .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { font-weight: 600; font-size: 14.5px; padding: 11px 18px; border-radius: var(--r-sm); }
.btn.primary { background: #fff; color: var(--ink); }
.btn.primary:hover { background: #e9edf2; text-decoration: none; }
.btn.ghost { color: #eaf1fb; border: 1px solid var(--line-dark); }
.btn.ghost:hover { border-color: rgba(255,255,255,0.5); text-decoration: none; }
/* title block — like a drawing's spec strip */
.titleblock { display: flex; flex-wrap: wrap; gap: 0; margin-top: 28px; border: 1px solid var(--line-dark); border-radius: var(--r-sm); overflow: hidden; }
.titleblock div { padding: 9px 16px; border-right: 1px solid var(--line-dark); }
.titleblock div:last-child { border-right: 0; }
.titleblock .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(234,241,251,0.5); display: block; }
.titleblock .val { font-family: var(--mono); font-size: 13px; color: #fff; }

/* typography */
.crumb { font-family: var(--mono); color: var(--text-3); font-size: 12px; margin-bottom: 14px; letter-spacing: 0.04em; }
h2 { font-family: var(--display); font-size: 23px; font-weight: 600; letter-spacing: -0.5px; margin: 46px 0 14px;
  padding-top: 30px; border-top: 1px solid var(--line); }
h3 { font-family: var(--body); font-size: 16px; font-weight: 650; margin: 26px 0 8px; }
p, li { color: var(--text); }
.lede { color: var(--text-2); font-size: 18px; margin: 0 0 14px; line-height: 1.5; }
li { margin: 5px 0; }
strong { font-weight: 640; color: var(--ink); }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-deep); }
pre { background: var(--ink); color: #d7e6fb; border-radius: var(--r-md); padding: 16px 18px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; color: inherit; }

.field { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 16px;
  margin: 16px 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.field .k { font-family: var(--mono); color: var(--text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; }

/* SIGNATURE — tool pipeline as a wired blueprint diagram */
.flow { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 22px 20px; margin: 18px 0; }
.flow .track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.node { position: relative; padding: 0 14px; }
.node:not(:last-child)::after { content: ""; position: absolute; top: 19px; right: -1px; width: 2px; height: 2px;
  border-radius: 50%; background: var(--accent);
  box-shadow: -12px 0 0 var(--accent), -24px 0 0 var(--accent-tint), -36px 0 0 var(--accent-tint); }
.node .seq { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 600; }
.node .nm { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink); font-weight: 600; margin: 7px 0 4px; }
.node .ds { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); color: var(--text-3); font-weight: 500; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; }
thead tr { border-bottom: 1px solid var(--line-strong); }
td code { white-space: nowrap; }
.tag { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.04em; }
.tag.ro { color: var(--text-2); background: var(--accent-tint); border: 1px solid var(--line); }
.tag.wr { color: #fff; background: var(--ink); }

/* steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0; }
.steps > li { counter-increment: s; position: relative; padding: 1px 0 16px 42px; }
.steps > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent);
  width: 28px; height: 24px; display: flex; align-items: center; }
.steps > li::after { content: ""; position: absolute; left: 8px; top: 28px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }

.callout { display: flex; gap: 11px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 13px 16px; margin: 18px 0; background: var(--surface); font-size: 14px; }
.callout .ic { flex: none; color: var(--accent); }

/* platform cards */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.card { display: block; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card:hover { text-decoration: none; border-color: var(--ink); box-shadow: 0 8px 26px rgba(12,26,43,0.10); transform: translateY(-2px); }
.card .pill { display: inline-flex; width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--paper);
  border: 1px solid var(--line); align-items: center; justify-content: center; }
.card .pill img { width: 22px; height: 22px; display: block; }
/* platform logo beside an eyebrow on the per-platform (dark) header bands */
.brandline { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.brandline .chip { width: 32px; height: 32px; flex: none; border-radius: 8px; background: #fff;
  display: flex; align-items: center; justify-content: center; }
.brandline .chip img { width: 20px; height: 20px; display: block; }
.brandline .eyebrow { margin: 0; }
.card h3 { font-family: var(--display); margin: 12px 0 4px; font-size: 18px; font-weight: 600; }
.card p { color: var(--text-2); font-size: 14px; margin: 0; }
.card .arrow { font-family: var(--mono); color: var(--accent); font-size: 12.5px; font-weight: 600; margin-top: 12px; display: inline-block; }

footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; font-family: var(--mono); letter-spacing: 0.02em; }
footer a { color: var(--text-2); }

/* tablet (sidebar still shown, tightened) */
@media (max-width: 1024px) {
  :root { --sidebar: 210px; }
  .main { padding: 36px 28px 100px; }
  .band.hero h1 { font-size: 42px; }
}

/* small tablet / large phone — drop the sidebar, single-column cards */
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 26px 18px 72px; }
  .cards { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; gap: 12px; }
  .topbar nav { display: none; }
  .band { padding: 28px 22px; }
  .band h1, .band.hero h1 { font-size: 30px; }
  .lede { font-size: 16px; }
  .flow .track { grid-template-columns: 1fr 1fr; gap: 20px 0; }
  .node:not(:last-child)::after { display: none; }
  /* the spec strip stacks into rows */
  .titleblock { flex-direction: column; }
  .titleblock div { border-right: 0; border-bottom: 1px solid var(--line-dark); width: 100%; }
  .titleblock div:last-child { border-bottom: 0; }
  .titleblock .val { overflow-wrap: anywhere; }
  /* let dense tables breathe and wrap */
  table { font-size: 13px; }
  th, td { padding: 9px 8px; }
  td code { white-space: normal; overflow-wrap: anywhere; }
}

/* phones */
@media (max-width: 520px) {
  h1, .band h1, .band.hero h1 { font-size: 26px; letter-spacing: -0.5px; }
  h2 { font-size: 19px; padding-top: 24px; margin-top: 36px; }
  .topbar .brand .sub { display: none; }
  .flow { padding: 18px 16px; }
  .flow .track { grid-template-columns: 1fr; gap: 16px; }
  .hero .row { display: grid; gap: 10px; }
  .hero .row .btn { text-align: center; }
  pre { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }
