/* MCP server detail — registry design */

.mcp-crumb {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 32px 0;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12.5px;
  color: var(--hp-muted2);
}

.mcp-crumb a {
  color: var(--hp-muted2);
  font-weight: 500;
}

.mcp-crumb a:hover {
  color: var(--hp-text);
}

.mcp-crumb__sep {
  color: var(--hp-faint);
}

.mcp-detail-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  /* minmax(0,1fr) so long install commands cannot blow past the column */
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 36px;
  padding: 24px 32px 56px;
}

.mcp-detail-col {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.mcp-detail-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--hp-border);
}

.mcp-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--hp-surface2);
  color: var(--hp-muted);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 28px;
  flex: none;
  border: 1px solid var(--hp-border);
  overflow: hidden;
}

.mcp-detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mcp-detail-header__body {
  flex: 1;
  min-width: 0;
}

.mcp-detail-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 700;
  color: var(--hp-text);
}

.mcp-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mcp-pill {
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 10px;
  background: var(--hp-surface2);
  color: var(--hp-muted);
}

.mcp-pill--cat {
  font-weight: 600;
  color: var(--hp-accent-fg);
  background: var(--hp-accent-tint);
}

.mcp-pill--official {
  font-weight: 600;
  color: var(--hp-text);
  border: 1px solid var(--hp-border2);
}

.mcp-pill--mono {
  font-family: var(--hp-mono);
  color: var(--hp-muted2);
  background: transparent;
  border: 1px solid var(--hp-border);
}

.mcp-detail-desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--hp-muted);
  max-width: 560px;
}

.mcp-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.mcp-btn-primary {
  background: var(--hp-text);
  color: var(--hp-card);
  font-family: var(--hp-font);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.mcp-btn-primary:hover {
  background: var(--hp-accent-deep);
  color: var(--hp-card);
}

.mcp-btn-outline {
  border: 1.5px solid var(--hp-text);
  color: var(--hp-text);
  font-family: var(--hp-font);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  background: transparent;
  cursor: pointer;
}

.mcp-btn-outline:hover {
  background: var(--hp-text);
  color: var(--hp-card);
}

.mcp-section {
  margin-top: 34px;
}

.mcp-section h2 {
  margin: 0 0 18px;
  font-size: 21px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--hp-text);
}

.mcp-section__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.mcp-section__head h2 {
  margin: 0;
}

.mcp-section__count {
  font-family: var(--hp-mono);
  font-size: 13px;
  color: var(--hp-faint);
}

.mcp-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mcp-step {
  display: flex;
  gap: 16px;
  min-width: 0;
}

.mcp-step > div {
  flex: 1;
  min-width: 0;
}

.mcp-step__num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--hp-accent-tint);
  color: var(--hp-accent-fg);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

.mcp-step__title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--hp-text);
}

.mcp-step__help {
  font-size: 13px;
  color: var(--hp-muted2);
  margin-bottom: 10px;
}

.mcp-step__help code,
.mcp-inline-code {
  font-family: var(--hp-mono);
  font-size: 12.5px;
  background: var(--hp-surface2);
  padding: 1px 6px;
  border-radius: 4px;
}

.mcp-terminal {
  background: #16181d;
  border: 1px solid #2c2f38;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.mcp-terminal code {
  font-family: var(--hp-mono);
  font-size: 13px;
  color: #e8eaed;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  /* Keep the Copy button visible; long commands scroll inside the code area */
  scrollbar-width: thin;
}

.mcp-terminal__copy {
  font-size: 12px;
  font-weight: 600;
  color: #16181d;
  background: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  flex: none;
  font-family: var(--hp-font);
}

.mcp-tool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mcp-tool-card {
  background: var(--hp-card);
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 16px 18px;
}

.mcp-tool-card code {
  font-family: var(--hp-mono);
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
}

@supports (color: oklch(0.5 0.19 264)) {
  .mcp-tool-card code {
    color: oklch(0.5 0.19 264);
  }
}

.mcp-tool-card p {
  font-size: 13.5px;
  color: var(--hp-muted);
  margin: 6px 0 0;
}

.mcp-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mcp-related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--hp-card);
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 13px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mcp-related-card:hover {
  border-color: #b9bcc9;
  box-shadow: 0 2px 8px rgba(22, 24, 29, 0.06);
  color: inherit;
}

.mcp-related-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--hp-surface2);
  color: var(--hp-muted);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}

.mcp-related-card__name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--hp-text);
}

.mcp-related-card__desc {
  font-size: 11.5px;
  color: var(--hp-muted2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: start;
  position: sticky;
  top: 76px;
  width: 100%;
  max-width: 348px;
  min-width: 0;
  z-index: 0;
}

.mcp-glance {
  background: var(--hp-card);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 22px 24px;
}

.mcp-glance__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--hp-muted2);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.mcp-glance__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hp-border);
  font-size: 13.5px;
}

.mcp-glance__row:last-child {
  border-bottom: none;
}

.mcp-glance__key {
  color: var(--hp-muted2);
}

.mcp-glance__val {
  font-weight: 600;
  color: var(--hp-text);
  text-align: right;
}

.mcp-glance__val--ok {
  color: #16a34a;
}

@supports (color: oklch(0.5 0.13 155)) {
  .mcp-glance__val--ok {
    color: oklch(0.5 0.13 155);
  }
}

.mcp-aside .home-nl {
  position: static;
  width: 100%;
  box-sizing: border-box;
}

.home-nl--inline {
  position: static;
  border-radius: 14px;
  padding: 28px 26px;
  margin: 36px 0;
}

.home-nl__form--row {
  flex-direction: row;
  flex-wrap: wrap;
}

.home-nl__form--row .home-nl__input {
  flex: 1;
  min-width: 180px;
}

.home-nl__form--row .home-nl__submit {
  flex: none;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 900px) {
  .mcp-detail-main {
    grid-template-columns: 1fr;
    padding: 20px 20px 48px;
  }

  .mcp-crumb {
    padding: 16px 20px 0;
  }

  .mcp-aside {
    position: static;
    max-width: none;
  }

  .mcp-aside .home-nl {
    position: static;
  }

  .mcp-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mcp-detail-header {
    flex-direction: column;
  }
}
