/* ContextMesh site: dark, brand-locked charcoal + teal, mono data labels.
   Radius scale: cards 14px, controls 10px, chips 6px. */

:root {
  --bg: #0b0f14;
  --bg-alt: #0c1118;
  --panel: #0f1620;
  --panel-2: #111a25;
  --line: #1e2a39;
  --line-soft: #16202c;
  --ink: #dbe7f4;
  --dim: #8aa0b8;
  --dim-2: #5f7288;
  --accent: #37d2aa;
  --accent-ink: #06201a;
  --blue: #5aa2ff;
  --bad: #31435a;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius-card: 14px;
  --radius-ctl: 10px;
  --radius-chip: 6px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1200px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

.mono-sm {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .01em;
  color: var(--dim);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: var(--radius-ctl);
  font-weight: 700;
}
.skip:focus { left: 12px; }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-ctl);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: #4ee0ba; border-color: #4ee0ba; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: #33475f; background: rgba(255, 255, 255, .02); }

.btn-sm { padding: 9px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(11, 15, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line-soft); background: rgba(11, 15, 20, .94); }

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.mark { width: 26px; height: 26px; flex: none; }
.wordmark { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.wordmark span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  color: var(--dim);
  transition: color .2s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-mobile-cta { display: none; }

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

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  padding: 0;
  position: relative;
  z-index: 42;
  flex: none;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .22s var(--ease), background .2s;
  transform-origin: center;
}
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle.is-open { border-color: var(--accent); }
.nav-toggle.is-open span { background: var(--accent); }
.nav-toggle.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(4, 8, 12, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s var(--ease), visibility .22s;
}
body.nav-open { overflow: hidden; }
body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* --------------------------------------------------------------------- hero */

.hero { padding: 56px 0 40px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 48px;
  align-items: center;
  min-height: min(620px, calc(100dvh - var(--nav-h) - 40px));
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2rem, 3.5vw, 2.95rem);
  line-height: 1.06;
  letter-spacing: -.032em;
  font-weight: 800;
  max-width: 19ch;
  text-wrap: balance;
}

.lede {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 52ch;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-visual { position: relative; height: clamp(300px, 34vw, 440px); }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8%;
  background-image:
    linear-gradient(to right, rgba(30, 42, 57, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 42, 57, .55) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(closest-side, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 78%);
  pointer-events: none;
}
#graphCanvas { position: relative; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- stats band */

.band { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg-alt); }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.band-item {
  padding: 26px 24px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.band-item:first-child { border-left: 0; padding-left: 0; }
.band-num {
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.band-split { color: var(--dim-2); font-size: .62em; }
.band-label { font-size: 12.5px; color: var(--dim); max-width: 22ch; }

/* ------------------------------------------------------------------ sections */

.section { padding: clamp(64px, 8vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

.h2 {
  font-size: clamp(1.6rem, 2.9vw, 2.35rem);
  letter-spacing: -.028em;
  line-height: 1.12;
  font-weight: 800;
  max-width: 26ch;
  text-wrap: balance;
}

.section-lede {
  margin-top: 16px;
  color: var(--dim);
  font-size: 16px;
  max-width: 60ch;
}

/* ------------------------------------------------------------------- problem */

.section-problem { background: var(--bg); }
.problem-list { margin-top: 48px; }

.problem-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line-soft);
}
.problem-row:last-child { border-bottom: 1px solid var(--line-soft); }

.problem-num {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  letter-spacing: -.03em;
  color: var(--ink);
  white-space: nowrap;
}
.problem-num .arrow { color: var(--dim-2); padding: 0 .18em; }
.problem-unit { font-size: .42em; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }

.problem-body h3 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 4px; }
.problem-body p { color: var(--dim); font-size: 15px; max-width: 58ch; }

/* ----------------------------------------------------------------- how it works */

.how-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: start;
}

.figure { position: relative; }
.figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
}
.figure figcaption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim-2);
  line-height: 1.6;
}

.steps { margin-top: 32px; }
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: 1px solid var(--line-soft); }
.step-idx { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.steps h3 { font-size: 15.5px; letter-spacing: -.01em; margin-bottom: 4px; }
.steps .mono-sm { font-size: 12.5px; }

/* -------------------------------------------------------------------- demo */

.section-demo { background: var(--bg-alt); }

.demo-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 36px;
}
.demo-head .eyebrow { margin-bottom: 14px; }
.demo-note { max-width: 34ch; margin: 0; }
.demo-head .h2 { max-width: 24ch; }

.demo-shell {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.demo-controls { padding: 26px 26px 24px; }

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 8px;
}

.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input[type="text"] {
  width: 100%;
  background: #0a1018;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 12px 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input[type="text"]::placeholder { color: var(--dim-2); }
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 210, 170, .12);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  background: #0a1018;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 6px 10px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: #33475f; color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.demo-status {
  margin-top: 18px;
  min-height: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.demo-status .ok { color: var(--accent); }
.demo-status .err { color: #ff8a94; }

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric-num {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.metric-label { font-size: 10.5px; color: var(--dim-2); text-transform: uppercase; letter-spacing: .08em; }

.demo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.demo-graph-stats { font-size: 11.5px; color: var(--dim-2); }

.demo-results {
  border-left: 1px solid var(--line);
  padding: 26px;
  background: #0c141d;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-block + .result-block { border-top: 1px solid var(--line-soft); padding-top: 18px; }
.result-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim-2);
  margin-bottom: 12px;
  font-weight: 500;
}
.result-title .count { color: var(--dim-2); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  border: 1px solid rgba(55, 210, 170, .32);
  background: rgba(55, 210, 170, .07);
  color: var(--accent);
  border-radius: var(--radius-chip);
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 12px;
}
.pill-muted { border-color: var(--line); background: transparent; color: var(--dim-2); }

.tool-list { display: flex; flex-direction: column; }
.tool-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
}
.tool-item:first-child { border-top: 0; padding-top: 0; }
.tool-name { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.tool-server {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.tool-desc { grid-column: 1 / -1; font-size: 12.5px; color: var(--dim-2); margin-top: -2px; }

.entity-list { display: flex; flex-direction: column; gap: 8px; }
.entity-item { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 12.5px; }
.entity-mention { color: var(--dim); }
.entity-arrow { color: var(--dim-2); }
.entity-name { color: var(--ink); }
.entity-kind { margin-left: auto; font-size: 10.5px; color: var(--dim-2); text-transform: uppercase; letter-spacing: .08em; }

.raw { margin-top: auto; }
.raw summary {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim-2);
  cursor: pointer;
  padding: 6px 0;
}
.raw summary:hover { color: var(--dim); }
.raw pre {
  margin-top: 10px;
  max-height: 200px;
  overflow: auto;
  background: #080d13;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-chip);
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--dim);
}

/* skeleton state */
.is-loading .tool-item,
.is-loading .entity-item { opacity: .35; }
.skeleton-line {
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, #16202c, #1e2a39, #16202c);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------- proof */

.proof-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-top: 36px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
}

.bar-row {
  display: grid;
  grid-template-columns: 104px 1fr 76px;
  gap: 14px;
  align-items: center;
  padding: 8px 0;
}
.bar-name { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.bar-track {
  height: 26px;
  background: #0a1018;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-chip);
  overflow: hidden;
}
.bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 1.1s var(--ease);
}
.bar-bad { background: var(--bad); }
.bar-good { background: var(--accent); }
.bar-val { font-family: var(--mono); font-size: 12.5px; color: var(--dim); text-align: right; }

.panel-note { margin-top: 14px; font-size: 13px; color: var(--dim-2); line-height: 1.55; }

.correct-row { display: flex; align-items: baseline; gap: 14px; padding: 6px 0; }
.correct-num { font-family: var(--mono); font-size: 46px; letter-spacing: -.04em; color: var(--ink); }
.correct-row-dim .correct-num { color: var(--dim-2); }
.correct-label { font-size: 13px; color: var(--dim); }

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 18px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.strip-item {
  padding: 20px 22px;
  border-left: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-num { font-family: var(--mono); font-size: 20px; letter-spacing: -.02em; }
.strip-label { font-size: 12px; color: var(--dim-2); max-width: 24ch; }

.footnote { margin-top: 22px; font-size: 12.5px; color: var(--dim-2); line-height: 1.7; max-width: 76ch; }
.footnote .mono-sm { font-size: 11.5px; color: var(--dim); }

/* ------------------------------------------------------------------- notes */

.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 36px;
}
.note { padding: 22px 0; border-top: 1px solid var(--line-soft); }
.note-wide {
  grid-column: 1 / -1;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-top: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin-top: 12px;
}
.note-idx { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .1em; }
.note h3 { font-size: 16px; letter-spacing: -.01em; margin: 8px 0 6px; }
.note p { font-size: 14.5px; color: var(--dim); max-width: 52ch; }

/* ----------------------------------------------------------------- pricing */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
  align-items: stretch;
}

.price {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.price-featured {
  border-color: rgba(55, 210, 170, .45);
  background: linear-gradient(180deg, rgba(55, 210, 170, .05), rgba(55, 210, 170, 0) 36%), var(--panel-2);
  position: relative;
}
.price-tag {
  position: absolute;
  top: -10px;
  left: 26px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.price h3 { font-size: 15px; letter-spacing: .02em; text-transform: uppercase; font-family: var(--mono); font-weight: 500; color: var(--dim); }
.price-amount { font-family: var(--mono); font-size: 34px; letter-spacing: -.03em; margin-top: 10px; }
.price-amount span { font-size: 13px; color: var(--dim-2); letter-spacing: 0; }
.price-for { font-size: 12.5px; color: var(--dim-2); margin-bottom: 14px; }
.price ul { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.price li { font-size: 13.5px; color: var(--dim); padding-left: 14px; position: relative; }
.price li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 6px;
  height: 1px;
  background: var(--accent);
  opacity: .7;
}
.price .btn { margin-top: auto; }

/* --------------------------------------------------------------------- faq */

.faq-wrap { max-width: 860px; }
.faq-wrap .h2 { max-width: none; }
.faq-item { border-top: 1px solid var(--line-soft); }
.faq-item:first-of-type { margin-top: 36px; }
.faq-item:last-of-type { border-bottom: 1px solid var(--line-soft); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-size: 16.5px;
  letter-spacing: -.01em;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  color: var(--dim-2);
  transition: color .2s var(--ease);
}
.faq-item[open] summary::after { content: "–"; color: var(--accent); }
.faq-item p { padding: 0 60px 20px 0; font-size: 14.5px; color: var(--dim); max-width: 72ch; }
.faq-item .mono-sm { font-size: 12px; color: var(--ink); }

/* ------------------------------------------------------------------ closing */

.closing { border-top: 1px solid var(--line-soft); background: var(--bg-alt); padding: clamp(64px, 8vw, 104px) 0; }
.closing-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.closing h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  letter-spacing: -.03em;
  line-height: 1.1;
  max-width: 24ch;
  font-weight: 800;
}
.closing .cta-row { margin-top: 0; }

/* ------------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--line-soft); background: var(--bg); padding-top: 56px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-tag { font-size: 13.5px; color: var(--dim); line-height: 1.7; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim-2);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 13.5px; color: var(--dim); padding: 4px 0; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-small { font-size: 13px; color: var(--dim-2); line-height: 1.7; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--dim-2);
}
.footer-bottom .mono-sm { font-size: 11.5px; color: var(--dim-2); }

/* ------------------------------------------------------------------ reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
  .hero { padding-top: 44px; }
  .hero-visual { height: 360px; max-width: 720px; }
  h1 { max-width: 24ch; }
  .how-grid { grid-template-columns: 1fr; gap: 36px; }
  .figure { max-width: 720px; }
  .proof-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .nav { position: sticky; }
  .nav-inner { position: relative; }
  .nav-links {
    display: flex;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 41;
    background: rgba(12, 17, 24, .98);
    border-bottom: 1px solid var(--line);
    padding: 10px 28px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .nav-links a {
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links a:last-of-type { border-bottom: 0; }
  .nav-mobile-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 12px 16px !important;
    border: 1px solid var(--accent) !important;
    border-radius: var(--radius-ctl);
    background: var(--accent);
    color: var(--accent-ink) !important;
    font-size: 14px !important;
    font-weight: 650;
    text-align: center;
  }
  .nav-mobile-cta:hover { color: var(--accent-ink) !important; background: #4ee0ba; }
  .nav-toggle { display: inline-flex; }
  .nav-actions {
    margin-left: auto;
    align-items: center;
    gap: 0;
  }
  .nav-actions .btn { display: none; }
  .band-grid { grid-template-columns: 1fr 1fr; }
  .band-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .band-item:nth-child(1), .band-item:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .demo-head { grid-template-columns: 1fr; }
  .demo-note { max-width: 60ch; }
  .demo-shell { grid-template-columns: 1fr; }
  .demo-results { border-left: 0; border-top: 1px solid var(--line); }
  .price-grid { grid-template-columns: 1fr; gap: 20px; }
  .price-featured { order: -1; }
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip-item:nth-child(1), .strip-item:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .input-row { grid-template-columns: 1fr; }
  .input-row .btn { width: 100%; }
  .doc-link {
    grid-template-columns: auto 1fr;
    gap: 8px 10px;
  }
  .doc-link .doc-path { grid-column: 2; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  .wrap {
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  }
  .nav-inner { gap: 12px; }
  .brand { min-width: 0; }
  .wordmark { font-size: 15px; }
  .wordmark-api { display: none; }
  .nav-links {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .hero { padding-top: 24px; padding-bottom: 24px; }
  .hero-grid,
  .how-grid,
  .api-grid,
  .api-grid-bottom,
  .demo-shell,
  .proof-grid,
  .price-grid,
  .footer-grid {
    min-width: 0;
  }
  .hero-copy,
  .hero-visual,
  .how-copy,
  .figure,
  .endpoint-list,
  .code-col,
  .demo-controls,
  .demo-results,
  .panel,
  .price,
  .quickstart,
  .tabs,
  .code-card {
    min-width: 0;
    max-width: 100%;
  }
  .hero-visual { height: min(240px, 56vw); width: 100%; overflow: hidden; }
  h1 { font-size: clamp(1.6rem, 7.5vw, 2.05rem); max-width: none; }
  .h2 { font-size: clamp(1.35rem, 6.5vw, 1.85rem); max-width: none; }
  .lede { font-size: 15px; max-width: none; }
  .section { padding: 48px 0; }
  .cta-row { width: 100%; }
  .cta-row .btn {
    flex: 1 1 100%;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
  .btn { white-space: normal; }
  .problem-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .problem-num { font-size: 1.65rem; white-space: normal; }
  .band { border-bottom: 0; }
  .band-grid { grid-template-columns: 1fr; }
  .band-item { border-left: 0 !important; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
  .band-item:last-child { border-bottom: 0; }
  .band-label { max-width: none; }
  .notes-grid { grid-template-columns: 1fr; }
  .note-wide { margin-top: 8px; }
  .metrics-strip { grid-template-columns: 1fr; }
  .strip-item { border-left: 0 !important; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
  .strip-item:last-child { border-bottom: 0; }
  .strip-label { max-width: none; }
  .demo-controls, .demo-results { padding: 16px; }
  .demo-metrics { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .demo-actions { flex-direction: column; align-items: stretch; }
  .demo-actions .btn { width: 100%; }
  .bar-row { grid-template-columns: 64px minmax(0, 1fr) 52px; gap: 8px; }
  .bar-name, .bar-val { font-size: 11px; }
  .entity-item { flex-wrap: wrap; }
  .entity-kind { margin-left: 0; width: 100%; }
  .tool-item { grid-template-columns: minmax(0, 1fr) auto; }
  .tool-name { overflow-wrap: anywhere; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .closing h2 { max-width: none; }
  .closing .cta-row { width: 100%; }
  .closing .cta-row .btn { flex: 1; }
  .code-card pre,
  .tab-panel pre,
  .raw pre,
  .endpoint-top code,
  .mono-sm,
  .inline-code {
    font-size: 11px;
    overflow-x: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .code-card pre,
  .tab-panel pre {
    padding: 12px;
  }
  .chips { gap: 6px; }
  .chip { font-size: 11px; padding: 7px 9px; max-width: 100%; white-space: normal; text-align: left; }
  .faq-item summary { padding-right: 32px; font-size: 15px; }
  .faq-item p { padding-right: 0; max-width: none; }
  .api-meta > span { flex-direction: column; align-items: flex-start; gap: 4px; }
  .doc-link {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .doc-link span:not(.method):not(.doc-path) {
    overflow-wrap: anywhere;
  }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .bar { width: var(--w, 0%); }
}

/* ---------------------------------------------------------------- web API additions */

.wordmark-api {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(55, 210, 170, .35);
  border-radius: 4px;
  padding: 2px 6px 3px;
  margin-left: 2px;
}

.inline-code {
  font-family: var(--mono);
  font-size: .88em;
  color: var(--ink);
  background: #0a1018;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 6px;
}

.hero-bullets {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--dim);
  font-size: 14px;
}
.hero-bullets li {
  padding-left: 16px;
  position: relative;
}
.hero-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 7px;
  height: 1.5px;
  background: var(--accent);
}

.section-api { background: var(--bg); }

.api-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 32px;
  margin-bottom: 30px;
}
.api-head .h2 { max-width: 26ch; }
.api-head .section-lede { max-width: 42ch; margin: 0; }

.api-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
  align-items: start;
}
.api-grid-bottom {
  grid-template-columns: 1.05fr .95fr;
  margin-top: 18px;
}

.endpoint-list { display: flex; flex-direction: column; gap: 12px; }

.endpoint {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.endpoint-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.endpoint-top code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}
.endpoint p { font-size: 13.5px; color: var(--dim); line-height: 1.55; }

.method {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid;
}
.method-post { color: var(--accent); border-color: rgba(55,210,170,.35); background: rgba(55,210,170,.07); }
.method-get { color: var(--blue); border-color: rgba(90,162,255,.35); background: rgba(90,162,255,.07); }

.code-col { display: flex; flex-direction: column; gap: 18px; }

.code-card {
  background: #080d13;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.code-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #0b1118;
}
.code-card pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: #b9cfe6;
}
.code-card code { font: inherit; color: inherit; }

.quickstart {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px 22px 20px;
}
.quickstart .result-title { margin-bottom: 14px; }
.qs-steps { display: flex; flex-direction: column; gap: 14px; }
.qs-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.qs-steps li > span {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--accent);
  font-family: var(--mono); font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.qs-steps strong { font-size: 14px; display: block; margin-bottom: 2px; }
.qs-steps .mono-sm { font-size: 12px; line-height: 1.7; }
.quickstart .panel-note { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 14px; }

@media (max-width: 1080px) {
  .api-grid, .api-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .api-head { grid-template-columns: 1fr; }
  .api-head .section-lede { max-width: 60ch; }
}

/* API doc links & auth notes */

.api-head-side { display: flex; flex-direction: column; gap: 14px; }
.api-head-side .section-lede { margin: 0; }

.api-doc-links { display: flex; flex-direction: column; gap: 8px; }
.doc-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--dim);
  font-size: 13px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.doc-link:hover { border-color: #33475f; color: var(--ink); background: var(--panel-2); }
.doc-path { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.inline-link { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(55,210,170,.35); text-underline-offset: 3px; }
.inline-link:hover { text-decoration-color: var(--accent); }

.panel-note strong { color: var(--ink); font-weight: 600; }

/* API tabs, meta rows, and errors */

.api-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--dim-2);
  line-height: 1.6;
}
.api-meta > span { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.api-meta .mono-sm { font-size: 11.5px; color: var(--dim); }

.tabs {
  background: #080d13;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.tab-bar {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--line-soft);
  background: #0b1118;
}
.tab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--dim-2);
  padding: 8px 12px 9px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  border-bottom: 0;
}
.tab:hover { color: var(--dim); }
.tab.active {
  color: var(--accent);
  background: #080d13;
  border-color: var(--line-soft);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: #b9cfe6;
}
.tab-panel code { font: inherit; color: inherit; }

.meta-list { display: flex; flex-direction: column; }
.meta-list > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  align-items: baseline;
}
.meta-list > div:first-child { border-top: 0; padding-top: 0; }
.meta-list span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.meta-list p { font-size: 13px; color: var(--dim); line-height: 1.55; }

/* pilot dialog */

.link-button {
  display: block;
  font-size: 13.5px;
  color: var(--dim);
  padding: 4px 0;
  text-align: left;
  transition: color .2s var(--ease);
}
.link-button:hover { color: var(--ink); }

.pilot-dialog {
  width: min(560px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.pilot-dialog::backdrop { background: rgba(4, 8, 12, .72); backdrop-filter: blur(3px); }
.pilot-form { padding: 28px; position: relative; }
.pilot-form .eyebrow { margin-bottom: 8px; }
.pilot-form h2 { font-size: 1.6rem; letter-spacing: -.02em; font-weight: 800; }
.pilot-sub { margin-top: 8px; color: var(--dim); font-size: 14px; line-height: 1.55; max-width: 44ch; }

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.dialog-close:hover { color: var(--ink); border-color: #33475f; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.field input,
.field textarea {
  width: 100%;
  background: #0a1018;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 13px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 210, 170, .12);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--dim-2); }

.pilot-actions { display: flex; gap: 10px; margin-top: 20px; }
.pilot-status { min-height: 18px; margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.pilot-status.ok { color: var(--accent); }
.pilot-status.err { color: #ff8a94; }

@media (max-width: 640px) {
  .pilot-form { padding: 22px; }
  .pilot-actions { flex-direction: column; }
  .pilot-actions .btn { width: 100%; }
  .meta-list > div { grid-template-columns: 1fr; gap: 2px; }
}
