/* /mcp/ — what the public MCP server is and how a client connects.
 *
 * One stylesheet, loaded by one page, built from the same primitives as
 * /rss/: a bordered hero, a grid of hard-edged plates, and a numbered
 * three-step strip. Nothing here is enhanced by JavaScript — the page is
 * documentation and has to read correctly with scripts off, so the
 * endpoint addresses are plain <code>, selectable, not copy buttons.
 */

.mcp-hero {
  padding: 64px 24px 44px;
  background: var(--tr-bg-1);
  border-bottom: var(--tr-bw-lg, 3px) solid var(--tr-line);
}

.mcp-hero__inner {
  max-width: 780px;
  margin: 0 auto;
}

.mcp-hero h1 {
  margin: 6px 0 14px;
}

.mcp-hero__lead {
  margin: 0;
  max-width: 62ch;
}

/* The endpoint is the one thing a visitor came for, so it is a plate of
   its own rather than a row in the table below. */
.mcp-endpoint {
  margin: 22px 0 0;
  background: var(--tr-bg-1);
  border: var(--tr-bw-lg, 3px) solid var(--tr-line);
  box-shadow: var(--tr-shadow-sm);
  padding: 16px 18px 14px;
  max-width: 62ch;
}

.mcp-endpoint__label {
  display: block;
  font-family: var(--tr-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tr-text-3);
  margin-bottom: 8px;
}

.mcp-endpoint__url {
  display: block;
  font-family: var(--tr-mono);
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 700;
  word-break: break-all;
  color: var(--tr-text);
}

/* Four scopes, so four columns and one clean row on a wide screen —
   auto-fill left a 3 + 1 orphan at most desktop widths. Two columns is
   the next honest step down: at 1100px four cards are ~245px, which is
   narrower than the tool names inside them. */
.mcp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.mcp-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--tr-bg-1);
  border: var(--tr-bw, 2px) solid var(--tr-line);
  box-shadow: var(--tr-shadow-sm);
  padding: 18px 18px 16px;
}

/* Title over scope, never beside it. Side-by-side fits two of the four
   cards and wraps the other two, so a row of them read as two different
   components; stacking makes the four identical at every width. */
.mcp-card__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.mcp-card__title {
  font-family: var(--tr-display);
  font-weight: 900;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
}

/* The scope a tool needs, printed as a plate the way an eyebrow is. A
   reader scanning the grid is usually asking "what do I have to grant",
   so the answer sits next to the name rather than in the prose. */
.mcp-scope {
  font-family: var(--tr-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--tr-text);
  color: #fff;
  padding: 3px 7px 2px;
  white-space: nowrap;
}

.mcp-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tr-text-2);
  flex: 1 1 auto;
}

.mcp-card__tools {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mcp-card__tools li {
  font-family: var(--tr-mono);
  font-size: 12px;
  font-weight: 600;
  border: var(--tr-bw, 2px) solid var(--tr-line);
  padding: 3px 7px 2px;
}

.mcp-steps {
  border-top: var(--tr-bw, 2px) solid var(--tr-line);
}

.mcp-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.mcp-step {
  background: var(--tr-bg-1);
  border: var(--tr-bw, 2px) solid var(--tr-line);
  padding: 20px 18px 18px;
}

.mcp-step__mark {
  font-family: var(--tr-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  background: var(--tr-text);
  color: #fff;
  display: inline-block;
  padding: 3px 8px 2px;
  margin-bottom: 12px;
}

.mcp-step h3 {
  font-family: var(--tr-display);
  font-weight: 900;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.mcp-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tr-text-2);
}

/* The limits list. Plain rules rather than a table: it is a handful of
   short pairs, and a table would need a scroll container on a phone for
   no gain. */
.mcp-facts {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: minmax(140px, 15ch) 1fr;
  gap: 0;
  border-top: var(--tr-bw, 2px) solid var(--tr-line);
  max-width: 760px;
}

.mcp-facts dt,
.mcp-facts dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: var(--tr-bw, 2px) solid var(--tr-line-soft);
  font-size: 14px;
  line-height: 1.5;
}

.mcp-facts dt {
  font-family: var(--tr-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tr-text-3);
  padding-right: 16px;
}

.mcp-facts dd {
  color: var(--tr-text-2);
  word-break: break-word;
}

.mcp-facts code {
  font-family: var(--tr-mono);
  font-weight: 600;
  word-break: break-all;
}

.mcp-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--tr-text-3);
  max-width: 72ch;
}

@media (max-width: 1100px) {
  .mcp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .mcp-hero { padding: 44px 18px 34px; }
  .mcp-grid { grid-template-columns: 1fr; }
  .mcp-steps__grid { grid-template-columns: 1fr; }
  /* Two narrow columns turn every value into a two-word-per-line column
     on a phone, so the term becomes a heading over its value instead. */
  .mcp-facts { grid-template-columns: 1fr; }
  .mcp-facts dt { padding-bottom: 0; border-bottom: 0; }
  .mcp-facts dd { padding-top: 4px; }
}
