/*
 * Styles for the MCP docs page (templates/index.html).
 *
 * The colour tokens below are copied verbatim from apps/landing/styles.css,
 * which copies them from the `@theme` block in apps/web/src/index.css, keeping
 * the `--color-*` names so all three can be diffed by eye. This page is served
 * by the Python service on a different hostname from the landing page, so it
 * cannot share that file — but it should not look like a different product.
 *
 * If you change a token in the app, change it here too.
 */

:root {
  --color-surface: oklch(100% 0 0);
  --color-surface-muted: oklch(97.5% 0.005 250);
  --color-ink: oklch(23% 0.02 260);
  --color-ink-muted: oklch(52% 0.02 260);
  --color-line: oklch(91% 0.008 260);
  --color-brand: oklch(52% 0.16 258);
  --color-brand-soft: oklch(96% 0.03 258);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-surface: oklch(21% 0.015 260);
    --color-surface-muted: oklch(25% 0.015 260);
    --color-ink: oklch(95% 0.005 260);
    --color-ink-muted: oklch(70% 0.015 260);
    --color-line: oklch(32% 0.015 260);
    --color-brand: oklch(72% 0.14 258);
    --color-brand-soft: oklch(30% 0.05 258);
  }
}

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

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* System fonts only: no webfont request, and nothing to allow in the CSP. */
  font-family:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
  margin-top: 0.25rem;
}

h2 {
  font-size: 1.25rem;
  padding-top: 2.5rem;
  margin-bottom: 0.75rem;
  border-top: 1px solid var(--color-line);
}

h3 {
  font-size: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

p {
  margin: 0.75rem 0 0;
}

a {
  color: var(--color-brand);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

abbr {
  text-decoration: none;
  color: var(--color-brand);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Header -------------------------------------------------------------- */

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.lede {
  font-size: 1.0625rem;
  color: var(--color-ink-muted);
  margin-top: 1rem;
}

.meta {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-ink-muted);
}

.meta code {
  color: var(--color-ink);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.4rem;
}

.sep {
  color: var(--color-line);
  padding: 0 0.35rem;
}

.section-lede {
  color: var(--color-ink-muted);
}

.note {
  font-size: 0.9375rem;
  color: var(--color-ink-muted);
  margin-top: 1.25rem;
}

/* ---- Code block ---------------------------------------------------------- */

pre {
  margin: 0.75rem 0 0;
  padding: 0.875rem 1rem;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

pre code {
  font-size: 0.875rem;
  white-space: pre;
}

/* ---- Tools --------------------------------------------------------------- */

.tool {
  margin-top: 1.5rem;
  padding: 1.125rem 1.25rem;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.tool p {
  margin-top: 0.5rem;
}

.tool h3 code {
  font-size: 0.9375rem;
}

.badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  color: var(--color-brand);
  background: var(--color-brand-soft);
  border: 1px solid transparent;
}

/* Write scope reads as the consequential one, so it is outlined rather than
   flat — the same signal the app uses for anything that changes data. */
.badge-write {
  border-color: var(--color-brand);
}

.params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

.param {
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.param-required {
  border-color: var(--color-brand);
}

.param-none {
  color: var(--color-ink-muted);
  font-style: italic;
}

/* ---- Scopes and links ---------------------------------------------------- */

.scopes {
  margin: 1rem 0 0;
}

.scopes dt {
  margin-top: 0.75rem;
  font-weight: 600;
}

.scopes dd {
  margin: 0.15rem 0 0;
  color: var(--color-ink-muted);
}

.links {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.links li {
  margin-top: 0.25rem;
}

/* ---- Footer -------------------------------------------------------------- */

.foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.9375rem;
  color: var(--color-ink-muted);
}

@media (min-width: 640px) {
  .wrap {
    padding-top: 4.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }
}
