/* the mcp page (docs/mcp-official.md 4.10), in the developer look of its boards (native-app-design.md
   section 23): white and near-black grounds, one grey, hairlines, inter, black buttons, and none of
   the developer chrome (no code, no monospace). light until the visitor picks dark, as every page.
   the frame over it is frame.css, which takes its archivo from here */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo/archivo-latin-wdth-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg2: #fafafa;
  --fg: #171717;
  --fg2: #3a3a3a;
  --mut: #666666;
  --line: #ebebeb;
  --line2: #e2e2e2;
  --fill2: #ebebeb;
  --btn: #171717;
  --btn-t: #ffffff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg2: #0f0f0f;
  --fg: #ededed;
  --fg2: #cfcfcf;
  --mut: #a1a1a1;
  --line: #242424;
  --line2: #2e2e2e;
  --fill2: #1f1f1f;
  --btn: #ededed;
  --btn-t: #0a0a0a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    400 16px / 28px "Inter",
    ui-sans-serif,
    system-ui,
    sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* over each element's own display, which a bare [hidden] would lose to */
.c-page [hidden] {
  display: none;
}

/* the resets weigh nothing, so each piece below sets its own */
:where(.c-page) :where(p, h1, h2, ul, ol) {
  margin: 0;
}

:where(.c-page) :where(a, button) {
  font: inherit;
  color: inherit;
}

.c-page :focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* one centred column, as the references' own mcp pages without their docs chrome */
.c-col {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.c-title {
  font-size: 36px;
  font-weight: 650;
  line-height: 44px;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
}

/* the address, in the page's own type, and its copy button */
.c-addr {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--bg2);
}

.c-url {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.c-copy,
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.c-copy {
  flex: none;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line2);
  background: var(--bg);
  color: var(--fg);
}

.c-btn {
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  background: var(--btn);
  color: var(--btn-t);
}

/* one tab per assistant: segmented tabs over a hairline */
.c-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.c-tab {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--mut);
  font-size: 14px;
  font-weight: 450;
  line-height: 36px;
  white-space: nowrap;
  cursor: pointer;
}

.c-tab[aria-selected="true"],
:root.js .c-tabs[hidden] > .c-tab:first-child {
  background: var(--fill2);
  color: var(--fg);
  font-weight: 500;
}

/* without a script each assistant's steps stand under its own heading */
.c-panel-h {
  margin-top: 40px;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.01em;
}

/* a page whose script runs (the head marks it js) paints connect.js's layout before the script has
   run, so nothing moves when it does: until the tabs show, the first tab is the selected one, its
   panel the only one, and copy stands beside the address */
:root.js .c-panel-h,
:root.js .c-tabs[hidden] ~ .c-panel ~ .c-panel {
  display: none;
}

:root.js:has(.c-tabs[hidden]) .c-tabs[hidden] {
  display: flex;
}

:root.js:has(.c-tabs[hidden]) .c-copy[hidden] {
  display: inline-flex;
}

/* numbered steps on a thin line */
.c-steps {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.c-steps > li {
  position: relative;
  padding: 0 0 28px 44px;
  counter-increment: step;
}

.c-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--mut);
  font-size: 13px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
}

.c-steps > li::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 32px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.c-steps > li:last-child {
  padding-bottom: 0;
}

.c-steps > li:last-child::after {
  display: none;
}

.c-steps p {
  color: var(--fg2);
}

.c-steps .c-btn + p {
  margin-top: 14px;
}

.c-steps p + p {
  margin-top: 12px;
}

.c-small {
  font-size: 14px;
  line-height: 22px;
}

.c-line a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line2);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* in a step its words keep the step's color, and its link the plain underline */
.c-small a {
  text-decoration: underline;
}

.c-line {
  margin-top: 40px;
  color: var(--fg2);
}

.c-near {
  margin-top: 6px;
}

/* what it can and cannot do, behind one quiet control */
.c-scope {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.c-scope summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  list-style: none;
  cursor: pointer;
}

.c-scope summary::-webkit-details-marker {
  display: none;
}

.c-scope summary svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--mut);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.c-scope[open] summary svg {
  transform: rotate(90deg);
}

.c-cc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 4px 0 24px;
}

.c-scope-h {
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

.c-cc ul {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  color: var(--fg2);
  font-size: 14px;
  line-height: 22px;
}

.c-cc li {
  margin: 4px 0;
}

.c-dev {
  margin-top: 28px;
  font-size: 14px;
  line-height: 22px;
}

.c-dev a {
  color: var(--mut);
  text-decoration: underline;
  text-decoration-color: var(--line2);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

@media (max-width: 640px) {
  .c-col {
    padding: 44px 20px 72px;
  }
  .c-title {
    font-size: 30px;
    line-height: 36px;
  }
  .c-cc {
    grid-template-columns: minmax(0, 1fr);
  }
  .c-steps > li {
    padding-left: 40px;
  }
  .c-tabs {
    row-gap: 6px;
  }
  .c-tab {
    height: 40px;
    line-height: 40px;
  }
  .c-copy,
  .c-btn {
    height: 40px;
  }
  /* a link in a line is a 24 px target on a phone; inline padding leaves its lines where they are */
  :is(.c-line, .c-small, .c-dev) a {
    padding-block: 4px;
  }
}
