/* ============================================================
   Anchor — /mcp (MCP Guide) page styles
   ============================================================
   Same design tokens as /docs and /pricing so the page feels
   native to anchor.cc. Structure borrows from Linear's MCP docs:
   a prominent connection-URL card up top, numbered setup steps,
   and a grouped tool reference table.
   ============================================================ */

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

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/_site/fonts/dm-sans-variable.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/_site/fonts/dm-sans-italic-variable.woff2") format("woff2");
}

:root {
  --font-body: system-ui, -apple-system, sans-serif;
  --font-display: "DM Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --color-bg: #eae6ec;
  --color-text: #1a1523;
  --color-text-light: #1a152394;
  --color-surface: #ffffff;
  --color-border: #dedae1;

  --content-width: 820px;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-surface);
  text-decoration: none;
  border-radius: 0 0 6px 0;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* --- Header ---
   Matches the main app's PlatformHeader: 48px height, logo + sign-in.
*/
.site-header {
  height: 48px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.nav-inner {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  height: 17px;
  width: auto;
  margin-left: 4px;
}

.logo-wordmark {
  height: 18px;
  width: auto;
  margin-left: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* --- Supported Agents dropdown ---
   Pure CSS: reveals on :hover and :focus-within for keyboard users. */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-chevron {
  color: currentColor;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow:
    0 1px 3px rgba(26, 21, 35, 0.06),
    0 12px 28px -8px rgba(26, 21, 35, 0.18);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0.15s;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0s 0s;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 4px;
}

.nav-dropdown-menu a:hover {
  background: #14011e0a;
}

.nav-dropdown-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}

.nav-dropdown-all svg {
  margin-left: auto;
}

.nav-dropdown-divider {
  height: 1px;
  margin: 4px 8px;
  background: var(--color-border);
}

.nav-dropdown-all {
  color: var(--color-text-light) !important;
  font-weight: 500 !important;
}

.nav-dropdown-all:hover {
  color: var(--color-text) !important;
}

.btn-sign-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  height: 28px;
  margin-left: 24px;
  background: rgba(26, 21, 35, 0.07);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-sign-in:hover {
  text-decoration: none;
  background: rgba(26, 21, 35, 0.12);
}

/* --- Article layout --- */
.mcp {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 72px 24px 120px;
}

.mcp-header {
  margin-bottom: 48px;
}

.mcp-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.mcp-headline {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin-bottom: 14px;
}

.mcp-subheadline {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text-light);
  max-width: 640px;
  margin-bottom: 32px;
}

/* --- URL card (the single most important element on the page) --- */
.mcp-url-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 22px 24px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mcp-url-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mcp-url-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.mcp-url-badge {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.01em;
}

.mcp-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
}

.mcp-url-hint {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-light);
  margin-top: 14px;
  margin-bottom: 18px;
}

.mcp-url-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
  border: 1px solid transparent;
}

.mcp .mcp-btn-primary {
  background: var(--color-text);
  color: #ffffff;
  text-decoration: none;
}

.mcp .mcp-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

.mcp .mcp-btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
  text-decoration: none;
}

.mcp .mcp-btn-ghost:hover {
  background: var(--color-bg);
  text-decoration: none;
}

/* --- Table of contents --- */
.mcp-toc {
  background: transparent;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 56px;
}

.toc-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.mcp-toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.mcp-toc li {
  counter-increment: toc;
  font-size: 14px;
  line-height: 1.5;
  padding-left: 28px;
  position: relative;
}

.mcp-toc li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 20px;
}

.mcp-toc ol a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.mcp-toc ol a:hover {
  border-bottom-color: var(--color-text-light);
}

/* --- Sections --- */
.mcp section {
  margin-bottom: 56px;
}

.mcp h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin-bottom: 16px;
  scroll-margin-top: 64px;
}

.mcp h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 64px;
}

.mcp p {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 14px;
  color: var(--color-text);
}

.mcp p:last-child {
  margin-bottom: 0;
}

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

.mcp section > ul li {
  font-size: 15px;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}

.mcp section > ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text);
}

.mcp strong {
  font-weight: 600;
}

.mcp em {
  font-style: italic;
}

.mcp a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mcp a:hover {
  text-decoration-thickness: 2px;
}

.mcp dfn {
  font-style: italic;
  font-weight: 500;
}

.mcp code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(26, 21, 35, 0.06);
  border-radius: 4px;
  padding: 1px 6px;
}

/* --- Numbered setup steps --- */
.mcp-steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
}

.mcp-steps > li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 22px;
}

.mcp-steps > li::before {
  content: none;
}

.mcp-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-text);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.mcp-step-body h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 16px;
}

.mcp-step-body p {
  font-size: 14.5px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.mcp-step-body p:last-child {
  margin-bottom: 0;
}

.mcp-inline-url {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px 10px;
  margin-top: 2px;
}

/* --- Agent grid (link chips) --- */
.mcp-agent-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
  padding: 0;
}

.mcp-agent-grid li {
  padding-left: 0 !important;
}

.mcp-agent-grid li::before {
  content: none !important;
}

.mcp-agent-grid a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mcp-agent-grid a:hover {
  border-color: var(--color-text);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.mcp-agent-grid img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.mcp-agent-note {
  font-size: 14px;
  color: var(--color-text-light);
  margin-top: 6px;
}

/* --- Tool reference table --- */
.mcp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  margin: 18px 0 10px;
}

.mcp-tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

.mcp-tool-table thead th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  text-align: left;
  padding: 12px 18px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.mcp-tool-table tbody th,
.mcp-tool-table tbody td {
  padding: 14px 18px;
  vertical-align: top;
  border-top: 1px solid var(--color-border);
  text-align: left;
  font-weight: 400;
}

.mcp-tool-table tbody tr:first-child th,
.mcp-tool-table tbody tr:first-child td {
  border-top: none;
}

.mcp-tool-table tbody th code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  padding: 0;
  color: var(--color-text);
}

.mcp-tool-table .col-tool {
  width: 220px;
}

.mcp-tool-table .col-desc {
  width: auto;
}

.mcp-tool-table tbody th {
  white-space: nowrap;
  width: 220px;
}

.mcp-tool-table tbody td {
  color: var(--color-text);
}

.mcp-tool-table tbody td code {
  font-size: 12px;
  padding: 1px 5px;
}

/* Group header row (category bar) */
.mcp-tool-table .mcp-group-row th {
  background: var(--color-bg);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 10px 18px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  width: auto;
  white-space: normal;
}

.mcp-tool-table .mcp-group-row:first-child th {
  border-top: none;
}

/* --- Auth DL --- */
.mcp-dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 20px;
  margin: 16px 0 18px;
  padding: 22px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.mcp-dl dt {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.mcp-dl dd {
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
}

/* --- Closing CTA --- */
.mcp-cta {
  margin-top: 24px;
  padding: 40px 28px;
  background: var(--color-text);
  color: #ffffff;
  border-radius: 16px;
  text-align: center;
}

.mcp-cta h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: #ffffff;
}

.mcp-cta p {
  color: #eae6ecc0;
  margin-bottom: 22px;
}

.mcp-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mcp-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.15);
}

/* --- Responsive --- */
@media (max-width: 720px) {
  .mcp {
    padding: 48px 20px 80px;
  }

  .mcp-headline {
    font-size: 36px;
  }

  .mcp-subheadline {
    font-size: 16px;
  }

  .mcp h2 {
    font-size: 24px;
  }

  .mcp h3 {
    font-size: 17px;
  }

  .mcp-url {
    font-size: 14px;
  }

  .mcp-url-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .mcp-dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
    padding: 18px 20px;
  }

  .mcp-dl dt {
    margin-top: 10px;
  }

  .mcp-dl dt:first-child {
    margin-top: 0;
  }

  .mcp-tool-table {
    font-size: 13px;
  }

  .mcp-tool-table thead th,
  .mcp-tool-table tbody th,
  .mcp-tool-table tbody td {
    padding: 10px 12px;
  }

  .mcp-tool-table tbody th,
  .mcp-tool-table .col-tool {
    width: 160px;
  }

  .mcp-cta {
    padding: 32px 22px;
  }
}

/* ============================================================
   Site footer
   ============================================================ */

.site-footer {
  background: var(--color-text);
  color: #eae6ec;
  padding: 64px 24px 32px;
  margin-top: 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 64px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 280px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-logo-icon {
  height: 18px;
  width: auto;
  filter: invert(1);
}

.footer-logo-wordmark {
  height: 19px;
  width: auto;
  filter: invert(1);
}

.footer-address {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  color: #eae6eccc;
  line-height: 1.6;
  margin-top: 4px;
}

.footer-email {
  font-family: var(--font-body);
  font-size: 13px;
  color: #eae6ec;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #eae6ec44;
  align-self: flex-start;
}

.footer-email:hover {
  text-decoration-color: #eae6ec;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #eae6ec88;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-family: var(--font-body);
  font-size: 14px;
  color: #eae6ec;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid #eae6ec18;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12px;
  color: #eae6ec66;
}

@media (max-width: 840px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-cols {
    gap: 28px;
  }
}

@media (max-width: 520px) {
  .site-footer {
    padding: 48px 20px 24px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}
