/* Nexus-MCP site. One accent (signal) marks Nexus-MCP; amber marks a loss. */
:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #14171f;
  --slate: #5a6172;
  --rule: #dde1e8;
  --grep: #b9c0cc;
  --signal: #2f5bea;
  --signal-ink: #1f46c8;
  --signal-soft: #e7edfd;
  --amber: #8f5b0a;
  --amber-soft: #fbf1df;
  --code-bg: #14171f;
  --code-ink: #dfe4ee;
  --radius: 10px;
  --wrap: 1120px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1218;
    --surface: #161a22;
    --ink: #e7eaf0;
    --slate: #9aa3b5;
    --rule: #262c38;
    --grep: #3d4554;
    --signal: #7c9bff;
    --signal-ink: #9db4ff;
    --signal-soft: #1a2340;
    --amber: #e0a44a;
    --amber-soft: #2a2114;
    --code-bg: #0a0d12;
    --code-ink: #dfe4ee;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1218;
  --surface: #161a22;
  --ink: #e7eaf0;
  --slate: #9aa3b5;
  --rule: #262c38;
  --grep: #3d4554;
  --signal: #7c9bff;
  --signal-ink: #9db4ff;
  --signal-soft: #1a2340;
  --amber: #e0a44a;
  --amber-soft: #2a2114;
  --code-bg: #0a0d12;
  --code-ink: #dfe4ee;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--signal-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--signal-soft); color: var(--ink); padding: 0.1em 0.35em; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; font-weight: 650; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; }
.nav-links { display: none; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--slate); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); }
.nav .gh { margin-left: auto; }
@media (min-width: 820px) { .nav-links { display: flex; } .nav .gh { margin-left: 8px; } }
.stars { font-weight: 600; color: var(--ink); }

/* Buttons and commands */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 8px; font: 500 0.95rem/1 var(--font); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: var(--signal-ink); }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--slate); }
.gh span:not(.stars) { display: none; }
@media (min-width: 520px) { .gh span:not(.stars) { display: inline; } }

.cmd { display: flex; align-items: center; gap: 10px; max-width: 100%; background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); padding: 6px 6px 6px 16px; }
.cmd code { background: none; color: inherit; padding: 0; font-size: 0.92rem; white-space: nowrap; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.cmd .prompt { color: #7c86a0; font-family: var(--mono); align-self: flex-start; padding-top: 2px; }
@media (max-width: 520px) { .cmd code { white-space: normal; overflow-wrap: anywhere; } }
.copy { flex: none; font: 500 0.82rem/1 var(--font); color: var(--code-ink); background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; padding: 8px 12px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.16); }
.copy.done { color: #9ff0c2; }
pre.block { position: relative; margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); padding: 16px 88px 16px 16px; overflow-x: auto; }
pre.block code { background: none; color: inherit; padding: 0; font-size: 0.88rem; }
pre.block .copy { position: absolute; top: 10px; right: 10px; }

/* Hero */
.hero { padding: 48px 0 56px; border-bottom: 1px solid var(--rule); }
/* minmax(0, 1fr): a one-column grid must not grow to fit a long command line. */
.hero-grid, .how-grid, .privacy-grid, .faq-grid, .try { grid-template-columns: minmax(0, 1fr); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 80px 0; } .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; } }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 700; letter-spacing: -0.025em; max-width: 16ch; }
.lede { margin-top: 20px; font-size: 1.12rem; color: var(--slate); max-width: 56ch; }
.hero .cmd { margin-top: 28px; max-width: 460px; }
.hero-sub { margin-top: 12px; color: var(--slate); font-size: 0.95rem; max-width: 52ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.hero-facts li { font-size: 0.86rem; color: var(--slate); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; }
.hero-facts a { color: inherit; text-decoration: none; }

/* The trace: two lanes drawn to scale */
.trace { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 20px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(20, 23, 31, 0.35); }
@media (min-width: 720px) { .trace { padding: 28px; } }
.trace figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 0.9rem; }
.trace-title { font-weight: 600; }
.trace-key { display: inline-flex; align-items: center; gap: 6px; color: var(--slate); }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key-grep { background: var(--grep); }
.key-nexus { background: var(--signal); margin-left: 8px; }
.trace-claim { margin-top: 16px; color: var(--slate); font-size: 0.95rem; }
.trace-claim strong { color: var(--ink); }
.trace-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.trace-tabs [role="tab"], .tabs [role="tab"] { font: 500 0.88rem/1 var(--font); color: var(--slate); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.trace-tabs [role="tab"]:hover, .tabs [role="tab"]:hover { color: var(--ink); border-color: var(--slate); }
.trace-tabs [aria-selected="true"], .tabs [aria-selected="true"] { color: var(--ink); background: var(--signal-soft); border-color: var(--signal); }
.trace-panel { margin-top: 22px; }
.lane + .lane { margin-top: 18px; }
.lane-name { font-weight: 600; font-size: 0.95rem; }
.bar { height: 22px; margin-top: 8px; border-radius: 5px; width: var(--w); }
.lane-grep .bar { background: repeating-linear-gradient(90deg, var(--grep) 0 22px, transparent 22px 25px); }
.lane-nexus .bar { background: var(--signal); min-width: 6px; }
/* With JavaScript, the bars of the shown language grow from zero: one motion, on a switch. */
.js .bar { width: 0; transition: width 900ms cubic-bezier(0.2, 0.7, 0.1, 1); }
.js .lane-nexus .bar { transition-delay: 250ms; }
.js .trace-panel.grown .bar { width: var(--w); }
@media (prefers-reduced-motion: reduce) { .js .bar { transition: none; width: var(--w); } }
.lane-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--slate); font-size: 0.9rem; }
.lane-stats strong { color: var(--ink); font-size: 1.05rem; }
.lane-nexus .lane-stats strong { color: var(--signal-ink); }
.trace-source { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--slate); font-size: 0.85rem; }

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 980px) { .section { padding: 96px 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-head { max-width: 64ch; margin-bottom: 32px; }
.section-head p { margin-top: 12px; color: var(--slate); }

/* Results */
.results-summary { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; }
@media (min-width: 820px) { .results-summary { grid-template-columns: repeat(3, 1fr); } }
.results-summary p { background: var(--surface); padding: 20px; color: var(--slate); font-size: 0.95rem; }
.results-summary strong { display: block; color: var(--ink); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.results-body h3 { margin: 36px 0 12px; font-size: 1.2rem; }
.results-body h3 span { display: block; margin-top: 4px; font-size: 0.9rem; font-weight: 400; color: var(--slate); letter-spacing: 0; }
.results-note { margin-top: 20px; color: var(--slate); font-size: 0.92rem; max-width: 80ch; }

.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.table-scroll:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--rule); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-weight: 600; font-size: 0.82rem; color: var(--slate); background: var(--paper); }
thead tr:first-child th[colspan] { text-align: center; color: var(--ink); border-left: 1px solid var(--rule); }
thead tr:last-child th:nth-child(odd) { border-left: 1px solid var(--rule); }
.bench th[scope="row"], .bench thead th[rowspan] { text-align: left; }
.bench th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); font-weight: 600; }
.bench thead th[rowspan]:first-child { position: sticky; left: 0; z-index: 2; }
.bench td.repo { text-align: left; }
.bench td.repo a { color: var(--ink); text-decoration-color: var(--rule); }
.bench td.repo span { display: block; color: var(--slate); font-size: 0.8rem; }
.bench tbody td:nth-child(odd) { border-left: 1px solid var(--rule); }
.bench td.base { color: var(--slate); }
.bench td.win { color: var(--signal-ink); font-weight: 600; }
.bench td.loss { color: var(--amber); font-weight: 600; background: var(--amber-soft); }
.bench td small { display: block; font-size: 0.78rem; font-weight: 500; }
.bench td.even small, .bench td.base small { color: var(--slate); }

/* How it works */
.how-grid { display: grid; gap: 40px; }
@media (min-width: 980px) { .how-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; } }
.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 24px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--signal); color: var(--signal-ink); font-weight: 600; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 1px; background: var(--rule); }
.steps p { margin-top: 6px; color: var(--slate); max-width: 58ch; }
.session { margin: 0; }
.session pre { margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 14px; padding: 22px; overflow-x: auto; font: 0.86rem/1.7 var(--mono); }
.session pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.session .c { color: #7c86a0; }
.session .k { color: #9db4ff; }
.session .s { color: #f2c27b; }
.session .o { color: #b9c2d3; }
.session figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--slate); }

/* Tools */
.tools { display: grid; gap: 1px; margin: 0; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tools { grid-template-columns: repeat(5, 1fr); } }
.tools div { background: var(--surface); padding: 18px; }
.tools dt code { font-size: 0.95rem; font-weight: 500; }
.tools dd { margin: 8px 0 0; color: var(--slate); font-size: 0.93rem; }
.tools-more { margin-top: 16px; color: var(--slate); max-width: 80ch; }

/* Install */
.install { max-width: 820px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.panel { margin-top: 18px; }
.panel > * + * { margin-top: 14px; }
.panel p { color: var(--slate); max-width: 70ch; }
.panel .links { display: flex; flex-wrap: wrap; gap: 10px; }
.try { margin-top: 56px; display: grid; gap: 20px; align-items: center; padding: 24px; border: 1px solid var(--signal); border-radius: 14px; background: var(--signal-soft); max-width: 820px; }
.try p { margin-top: 8px; color: var(--slate); }
@media (min-width: 820px) { .try { grid-template-columns: 1.2fr 1fr; } }

/* Privacy */
.privacy-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .privacy-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.privacy-grid > div > p { margin-top: 14px; color: var(--slate); max-width: 60ch; }
.plain-list { margin: 18px 0; padding-left: 20px; color: var(--slate); }
.plain-list li + li { margin-top: 6px; }
.flow { margin: 0; max-width: 440px; justify-self: center; width: 100%; }
.flow-ext { fill: var(--surface); stroke: var(--rule); }
.flow-machine { fill: var(--signal-soft); stroke: var(--signal); stroke-dasharray: 4 4; }
.flow-box { fill: var(--surface); stroke: var(--rule); }
.flow-core { stroke: var(--signal); stroke-width: 1.5; }
.flow-name { fill: var(--ink); font: 600 13px var(--font); }
.flow-note { fill: var(--slate); font: 400 11.5px var(--font); }
.flow-label { fill: var(--signal-ink); font: 600 12px var(--font); }
.flow-line { stroke: var(--slate); stroke-width: 1.4; }
.flow-optin { stroke: var(--amber); stroke-dasharray: 4 3; }
rect.flow-optin { fill: var(--amber-soft); stroke-dasharray: 4 3; }
.flow-head { fill: var(--slate); }
.flow-head-out { fill: var(--amber); }

/* FAQ */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 0.6fr 1.4fr; } }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list details:first-child { border-top: 1px solid var(--rule); }
.faq-list summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.3rem; color: var(--slate); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 0 20px; color: var(--slate); max-width: 72ch; }

/* Final call to action */
.final { text-align: left; }
.final-inner { max-width: 760px; }
.final p { margin-top: 14px; color: var(--slate); }
.final-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; color: var(--slate); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a { color: var(--slate); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* The benchmarks page */
.page-main { padding-top: 48px; padding-bottom: 64px; }
.page-main h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-main > p { margin-top: 14px; color: var(--slate); max-width: 80ch; }
.page-main .lede { color: var(--ink); }
.page-section { margin-top: 56px; }
.page-section > p, .page-section li { color: var(--slate); max-width: 80ch; }
.page-section > p { margin-top: 10px; }
.page-section h3 { margin: 28px 0 12px; }
.page-section .table-scroll { margin-top: 16px; }
.plain th, .plain td { text-align: left; }
.plain td:first-child { font-weight: 500; }
.detail td.repo span { display: block; font-size: 0.8rem; }
