/* ============================================================
   MCP QUICKSTART — «MCP за 30 секунд»
   Namespaced under .mcp-quickstart
   ============================================================ */

.mcp-quickstart {
  background: var(--paper);
}

.mcp-quickstart__header {
  max-width: var(--max-w-narrow);
  margin: 0 0 var(--s-12);
}

.mcp-quickstart h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
}

.mcp-quickstart .lead {
  margin-top: var(--s-3);
}

.mcp-quickstart .mcp-code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 1px 6px;
  background: var(--graphite-100);
  border: 1px solid var(--graphite-200);
  border-radius: 4px;
  color: var(--ink-900);
  white-space: nowrap;
}

/* ----- Steps grid ----- */
.mcp-steps {
  list-style: none;
  margin: 0 0 var(--s-12);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
}

.mcp-step {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  background: var(--paper-pure);
  border: 1px solid var(--graphite-200);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  min-width: 0;
}

.mcp-step__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
}

.mcp-step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--indigo-700);
  background: var(--indigo-50);
  padding: 3px 8px;
  border-radius: 4px;
}

.mcp-step__title {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  color: var(--ink-900);
}

.mcp-step__hint {
  margin: 0;
  font-size: 14px;
  color: var(--graphite-500);
  line-height: 1.5;
}

.mcp-step__hint .mcp-code {
  font-size: 11.5px;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
}

/* ----- Terminal mock ----- */
.mcp-term {
  margin: auto 0 0;
  border: 1px solid var(--graphite-200);
  border-radius: var(--radius);
  background: var(--ink-900);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mcp-term__cap {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mcp-term__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--graphite-700);
  flex-shrink: 0;
}
.mcp-term__dot[data-c="r"] { background: #FF5F57; }
.mcp-term__dot[data-c="y"] { background: #FEBC2E; }
.mcp-term__dot[data-c="g"] { background: #28C840; }

.mcp-term__path {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(250, 250, 247, 0.55);
  letter-spacing: 0.02em;
}

.mcp-term__pre {
  margin: 0;
  padding: var(--s-4);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--paper);
  background: transparent;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.mcp-term__prompt {
  color: #28C840;
  margin-right: 6px;
  user-select: none;
}

/* JSON syntax tokens */
.tk-k { color: #93C5FD; }   /* keys: light indigo */
.tk-s { color: #FCD34D; }   /* strings: amber */
.tk-p { color: rgba(250, 250, 247, 0.55); } /* punctuation */

/* ----- Chat mock (step 3) ----- */
.mcp-term--chat .mcp-term__pre,
.mcp-chat {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.mcp-chat__msg {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 92%;
}

.mcp-chat__msg--user {
  background: var(--indigo-700);
  color: var(--paper);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.mcp-chat__msg--bot {
  background: rgba(255, 255, 255, 0.07);
  color: var(--paper);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.mcp-chat__msg code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
}

.mcp-chat__msg--user code {
  background: rgba(0, 0, 0, 0.22);
}

.mcp-chat__tool {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(250, 250, 247, 0.6);
  padding: 4px 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.mcp-chat__tool code {
  color: var(--paper);
  font-size: 11px;
}

/* ----- Trust badges ----- */
.mcp-trust {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}

.mcp-trust__item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 16px;
  background: var(--paper-pure);
  border: 1px solid var(--graphite-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.3;
}

.mcp-trust__item svg {
  color: var(--indigo-700);
  flex-shrink: 0;
}

/* ----- CTA + footnote ----- */
.mcp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: 0 0 var(--s-4);
}

.mcp-footnote {
  margin: 0;
  font-size: 14px;
  color: var(--graphite-500);
  line-height: 1.5;
}

.mcp-footnote a {
  color: var(--indigo-700);
  font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .mcp-steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mcp-step:nth-child(3) { grid-column: 1 / -1; }
  .mcp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .mcp-steps,
  .mcp-step:nth-child(3) {
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
  }
  .mcp-trust { grid-template-columns: minmax(0, 1fr); }
  .mcp-term__pre { font-size: 11.5px; }
  .mcp-cta .btn {
    flex: 1 1 100%;
    text-align: center;
    justify-content: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
    font-size: 15px;
    padding: 14px 16px;
  }
}

/* === Session 26 cosmetic tweaks === */

/* 8.1 — JSON/code pre-wrap: не обрезать на узких экранах */
.mcp-quickstart .mcp-term__pre,
.mcp-quickstart .mcp-step pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 8.2 — Выравнивание карточек: одинаковая высота, терминал прижат к нижнему краю.
   .mcp-step уже flex-column; добавляем justify-content + height для stretch.
   .mcp-steps уже grid; добавляем align-items: stretch явно. */
.mcp-quickstart .mcp-steps {
  align-items: stretch;
}
.mcp-quickstart .mcp-step {
  justify-content: space-between;
  height: 100%;
}

/* 8.3 — Убрать pill-обводку у пути к конфиг-файлу в карточке 02.
   В HTML это <code class="mcp-code"> внутри .mcp-step__hint. Уточняем
   специфичностью, чтобы не трогать остальные .mcp-code (например, в lead). */
.mcp-quickstart .mcp-step__hint .mcp-code {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 500;
  color: rgba(14, 27, 46, 0.7);
}
