/* ============================================================
   Anchor — /supported-agents page styles
   ============================================================
   Same design tokens as /docs, /pricing, and /mcp. Structure
   borrows from Linear's MCP docs: an index card up top with
   one tile per agent, then a section per agent with a numbered
   step list and optional config block.
   ============================================================ */

*,
*::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 --- */
.agents {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 72px 24px 120px;
}

.agents-header {
  margin-bottom: 40px;
}

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

.agents-eyebrow a {
  color: var(--color-text-light);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.agents-eyebrow a:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

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

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

.agents-url-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 100%;
  overflow-x: auto;
}

.agents-url-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  white-space: nowrap;
}

.agents-url {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
}

/* --- Agent index (grid of tiles) --- */
.agents-index {
  margin-top: 8px;
  margin-bottom: 64px;
  padding: 24px 24px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.index-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: 16px;
}

.agents-index ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
}

.agents-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.agents-index a:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.agents-index a img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Inline-SVG tile (e.g. "Any MCP Client") — match the 22px img footprint.
   Scoped under `.agents-index a` so this rule outranks the generic
   `.agents-index a span { flex: 1 1 auto }` above (which would otherwise
   stretch the icon wrapper and push the label to the middle). */
.agents-index a .agents-index-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.agents-index a .agents-index-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Let the generic "Any MCP Client" tile span two columns so the last
   row stays symmetric (3-col grid → row reads MS Copilot | Any MCP Client).
   Uses :has() so we don't have to add an extra class on the <li>. */
.agents-index li:has(.agents-index-any) {
  grid-column: span 2;
}

.agents-index a span {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

.agents-index a small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-light);
  margin-top: 2px;
  line-height: 1.2;
}

.agents-index a > div,
.agents-index a > div + small {
  /* reserved for future two-line layouts */
}

.agents-index a span + small {
  display: none;
}

/* Two-line layout: show the sub-label next to the name */
.agents-index a {
  flex-wrap: wrap;
}

.agents-index a span {
  flex: 1 1 auto;
}

.agents-index a small {
  display: block;
  flex: 0 0 100%;
  margin-left: 34px;
  margin-top: -2px;
}

/* --- Agent sections --- */
.agent-section {
  padding: 28px 0 36px;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 56px;
}

.agent-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.agent-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.agent-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  margin-top: 2px;
}

.agent-section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.18;
  margin-bottom: 4px;
  scroll-margin-top: 56px;
}

.agent-vendor {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-light);
  letter-spacing: normal;
  margin-left: 4px;
}

.agent-lede {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-light);
  margin-bottom: 0;
}

.agent-subhead {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-top: 22px;
  margin-bottom: 10px;
}

.agent-steps {
  list-style: decimal;
  padding-left: 22px;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-steps > li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  padding-left: 4px;
}

.agent-steps > li::marker {
  color: var(--color-text-light);
  font-weight: 600;
}

.agent-steps > li ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-steps > li ul li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
}

.agent-steps-continued {
  margin-top: 12px;
}

.agent-url,
.agent-cmd {
  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: 3px 8px;
  margin-top: 4px;
}

.agent-url {
  color: var(--color-text);
}

.agent-cmd {
  color: var(--color-text);
}

.agent-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  background: var(--color-text);
  color: #e9e4ec;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0 14px;
}

.agent-code code {
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  padding: 0;
  color: inherit;
}

.agent-note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text);
  border-radius: 8px;
  margin: 12px 0 14px;
}

.agent-try {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text);
  padding: 10px 14px;
  background: rgba(26, 21, 35, 0.04);
  border-radius: 8px;
  margin-top: 14px;
}

.agent-try em {
  font-style: italic;
}

/* --- Connector store banner (dark box) --- */
.agent-store-banner {
  padding: 16px 20px;
  background: var(--color-text);
  color: #eae6ecc0;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.agent-store-banner strong {
  color: #ffffff;
  font-weight: 600;
}

/* --- Agent tab chips (e.g. Chat · Cowork · Code) --- */
.agent-tabs {
  display: inline-flex;
  gap: 2px;
  margin-top: 8px;
  background: var(--color-text);
  border-radius: 8px;
  padding: 3px;
}

.agent-tab {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: #eae6ecaa;
  padding: 4px 14px;
  border-radius: 6px;
}

/* --- Generic MCP note --- */
.agent-section-generic {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 28px;
  margin-top: 24px;
}

.agent-section-generic h2 {
  margin-bottom: 10px;
}

.agent-generic-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agent-generic-list li {
  font-size: 14px;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.agent-generic-list li::before {
  content: "›";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--color-text-light);
  font-weight: 600;
}

/* --- Links / code --- */
.agents a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

.agents-index a,
.agents-url-card .agents-url,
.agent-head a,
.agents-cta-btn {
  text-decoration: none;
}

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

.agent-steps code,
.agent-note code,
.agent-generic-list code {
  font-size: 13px;
}

.agents strong {
  font-weight: 600;
}

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

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

.agents-cta p {
  color: #eae6ecc0;
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 1.55;
}

.agents-cta a {
  color: #ffffff;
}

.agents-cta .agents-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;
}

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

/* --- Hamburger menu (hidden on desktop) --- */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* --- Responsive --- */
@media (max-width: 720px) {
  /* --- Mobile nav: hamburger menu --- */
  .nav-hamburger {
    display: flex;
  }

  .site-header {
    position: relative;
    z-index: 100;
  }

  .nav-actions {
    display: none;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px -8px rgba(26, 21, 35, 0.12);
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
  }

  .nav-actions.is-open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 6px;
    display: block;
  }

  .nav-link:hover {
    background: rgba(26, 21, 35, 0.04);
  }

  .btn-sign-in {
    margin-left: 0;
    margin-top: 8px;
    justify-content: center;
    height: 40px;
  }

  .nav-dropdown-menu {
    display: none !important;
  }

  .nav-dropdown-chevron {
    display: none;
  }

  .nav-dropdown-trigger {
    padding: 10px 12px;
    border-radius: 6px;
    display: block;
  }

  .agents {
    padding: 48px 20px 80px;
  }

  .agents-headline {
    font-size: 34px;
  }

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

  .agents-index {
    padding: 20px 18px 16px;
  }

  .agents-url-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .agent-head {
    gap: 12px;
  }

  .agent-logo {
    width: 32px;
    height: 32px;
  }

  .agent-section h2 {
    font-size: 22px;
  }

  .agents-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);
  }
}
