:root {
  --paper: #fcfcfb;
  --ink: #1d2026;
  --muted: #5d6270;
  --line: #e4e4e0;
  --blush: #f8ecee;
  --blush-edge: #ecd3d8;
  --plum: #6e2342;
  --denim: #1c2c4c;
  --denim-deep: #142039;
  --ecru: #ede7da;
  --ecru-muted: #b9b4a8;
  --butter: #f1dc8c;

  --display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --text: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --measure: 68ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 18px/1 var(--display);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
}

.site-nav a:hover {
  background: #f0f0ec;
}

.site-nav a[aria-current='page'] {
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font: 500 15px/1.2 var(--text);
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover {
  background: #33373f;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  background: #f0f0ec;
}

.site-nav .button {
  padding: 8px 16px;
}

.site-nav .button-primary:hover {
  background: #33373f;
}

/* ---- Home ---- */

.hero {
  padding: 120px 0 128px;
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font: 650 clamp(44px, 7vw, 84px) / 0.98 var(--display);
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 52ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ---- MCP page ---- */

.page-intro {
  padding: 72px 0 40px;
}

.page-intro h1 {
  margin: 0;
  font: 650 clamp(36px, 5vw, 56px) / 1.02 var(--display);
  letter-spacing: -0.03em;
}

.page-intro .lede {
  max-width: var(--measure);
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.endpoint-label {
  color: var(--muted);
  font-size: 15px;
}

.endpoint code {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: 500 15px/1.4 var(--mono);
}

.abilities {
  max-width: 720px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px 32px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  font-size: 16px;
}

.abilities li {
  padding-left: 18px;
  position: relative;
}

.abilities li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--ink);
}

/* Tabs sit on a stitched seam. */
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 56px;
  border-bottom: 2px dashed #c9c9c2;
}

.tab {
  position: relative;
  bottom: -2px;
  padding: 14px 22px 12px;
  border: 2px dashed transparent;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: none;
  color: var(--muted);
  font: 600 16px/1 var(--text);
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected='true'][data-tab='humans'] {
  background: var(--blush);
  border-color: var(--blush-edge);
  color: var(--plum);
}

.tab[aria-selected='true'][data-tab='agents'] {
  background: var(--denim);
  border-color: var(--denim);
  color: var(--ecru);
}

.panel {
  padding: 48px clamp(20px, 5vw, 56px) 56px;
  border-radius: 0 0 16px 16px;
}

.panel[hidden] {
  display: none;
}

.panel h2 {
  margin: 0;
  font: 650 28px/1.15 var(--display);
  letter-spacing: -0.02em;
}

.panel h3 {
  margin: 0 0 6px;
  font: 600 18px/1.3 var(--text);
}

.panel p {
  max-width: var(--measure);
  margin: 0 0 12px;
}

.panel .intro {
  margin-top: 10px;
  margin-bottom: 36px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 32px;
}

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 16px;
}

.steps > li::before {
  content: counter(step);
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font: 600 15px/1 var(--text);
}

.steps > li > * {
  grid-column: 2;
  min-width: 0;
}

.aside {
  margin-top: 44px;
  padding-top: 28px;
}

/* Commands */
.code {
  position: relative;
  margin: 8px 0 0;
  border-radius: 10px;
}

.code pre {
  margin: 0;
  padding: 16px 92px 16px 18px;
  overflow-x: auto;
  font: 400 14px/1.6 var(--mono);
  white-space: pre;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 13px/1 var(--text);
  cursor: pointer;
  opacity: 0.8;
}

.copy:hover,
.copy:focus-visible {
  opacity: 1;
}

/* For humans: blush */
.panel-humans {
  background: var(--blush);
  color: #3a1424;
  border: 2px dashed var(--blush-edge);
  border-top: 0;
}

.panel-humans h2 {
  color: var(--plum);
}

.panel-humans .steps > li::before {
  background: var(--plum);
  color: var(--blush);
}

.panel-humans .code {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--blush-edge);
}

.panel-humans .aside {
  border-top: 2px dashed var(--blush-edge);
}

.panel-humans a {
  color: var(--plum);
  font-weight: 600;
}

/* For agents: denim */
.panel-agents {
  background: var(--denim);
  color: var(--ecru);
}

.panel-agents h2 {
  color: #fff;
}

.panel-agents .intro,
.panel-agents .note {
  color: var(--ecru-muted);
}

.panel-agents .steps > li::before {
  background: var(--butter);
  color: var(--denim);
}

.panel-agents .code {
  background: var(--denim-deep);
  color: var(--ecru);
}

.panel-agents .aside {
  border-top: 2px dashed #3a4a6c;
}

.panel-agents a {
  color: var(--butter);
}

.panel-agents :focus-visible {
  outline-color: var(--butter);
}

.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  max-width: 820px;
  margin: 0;
}

.spec dt {
  color: var(--ecru-muted);
}

.spec dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.spec code,
.panel p code,
.steps code {
  font: 400 0.9em/1.4 var(--mono);
}

/* ---- Footer ---- */

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 32px;
}

.home .site-footer {
  margin-top: 0;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .hero {
    padding: 72px 0 88px;
  }
  .site-nav a:not(.button) {
    padding: 8px;
  }
  .tab {
    padding: 12px 14px 10px;
    font-size: 15px;
  }
  .steps > li {
    grid-template-columns: 32px 1fr;
    gap: 4px 12px;
  }
  .steps > li::before {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  .spec {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .spec dd {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.panel-agents .note {
  margin-top: 32px;
}
