:root {
  --bg: #fbfbf9;
  --bg-alt: #f2f3f1;
  --card: #ffffff;
  --text: #11161c;
  --muted: #56606b;
  --faint: #8a939c;
  --line: #e2e4e1;
  --accent: #2a78d6;
  --accent-ink: #1d5fb0;
  --accent-soft: #e6f0fc;
  --ok: #1d7a46;
  --term-bg: #0f1722;
  --term-text: #dbe6f3;
  --term-dim: #7f93ab;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px rgba(16, 24, 40, .08);
  --font: Inter, "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1017;
    --bg-alt: #101722;
    --card: #131b27;
    --text: #e8edf3;
    --muted: #a3afbd;
    --faint: #75818f;
    --line: #223043;
    --accent: #5aa2f5;
    --accent-ink: #7db6f7;
    --accent-soft: #14263c;
    --ok: #4cc47e;
    --term-bg: #070c12;
    --on-accent: #06121f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.center { text-align: center; }
.sub { color: var(--muted); max-width: 760px; margin-inline: auto; }
.fine { color: var(--faint); font-size: .88rem; }
.eyebrow { color: var(--accent-ink); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* nav */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--text); letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo .l1 { fill: var(--accent); }
.logo .l2 { fill: var(--accent); fill-opacity: .62; }
.logo .l3 { fill: var(--accent); fill-opacity: .34; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: .95rem; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent, #fff); }
.btn-primary:hover { background: var(--accent-ink); }
.nav nav .btn-ghost, .btn-ghost { border-color: var(--line); color: var(--text); background: var(--card); }
.nav nav .btn-ghost { height: 36px; padding: 0 14px; }
.btn-ghost:hover { border-color: var(--accent); }

/* hero */
.hero { padding: 72px 0 56px; background:
  radial-gradient(900px 420px at 88% -10%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; gap: 48px; text-align: center; }
.hero-grid h1 { max-width: 900px; margin-inline: auto; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 720px; margin-inline: auto; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; align-items: center; justify-content: center; }
.hero-shot { max-width: 1120px; margin-inline: auto; text-align: left; }
.cmd { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; border-radius: 10px; background: var(--term-bg); color: var(--term-text); }
.cmd code { background: none; color: inherit; padding: 0; font-size: .92rem; }
.cmd .prompt { color: var(--term-dim); margin-right: 6px; }
.copy { height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid #2b3a4d; background: #16222f; color: var(--term-text); font: 600 .8rem var(--font); cursor: pointer; }
.copy:hover { border-color: var(--accent); }
.hero-shot { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero-shot img { background: #fff; }
.hero-shot figcaption { font-size: .85rem; color: var(--faint); padding: 12px 16px; border-top: 1px solid var(--line); }
.window { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.window span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }

/* stats */
.stats { border-block: 1px solid var(--line); background: var(--bg-alt); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 26px 0; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent-ink); }
.stat-row span { color: var(--muted); font-size: .92rem; }

/* sections */
.section { padding: 88px 0; }
.problem p { font-size: 1.1rem; color: var(--muted); }
.problem strong { color: var(--text); }
.grid { display: grid; gap: 18px; margin-top: 40px; }
.features { grid-template-columns: repeat(3, 1fr); }
.cases { grid-template-columns: repeat(3, 1fr); }
.grid article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid article p { color: var(--muted); font-size: .96rem; margin: 0; }
.features article h3::before { content: ""; display: block; width: 28px; height: 5px; border-radius: 3px; background: var(--accent); margin-bottom: 30px; box-shadow: 0 8px 0 -0px color-mix(in srgb, var(--accent) 55%, transparent), 4px 16px 0 -0px color-mix(in srgb, var(--accent) 28%, transparent); }
.features article h3 { padding-bottom: 12px; }

/* showcase */
.showcase { background: var(--bg-alt); border-block: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 20px; }
.tabs button { font: 600 .92rem var(--font); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.shots figure { margin: 0 auto; max-width: 1040px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.shots img { max-height: 640px; width: 100%; object-fit: cover; object-position: top; }
.shots figcaption { padding: 14px 18px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }

/* how */
.pipeline { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.pipeline li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; }
.pipeline li:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 26px; color: var(--faint); font-weight: 700; }
.pipeline .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; margin-bottom: 10px; }
.pipeline p { color: var(--muted); font-size: .9rem; margin: 0; }
.rule { margin: 40px auto 0; max-width: 820px; padding: 22px 26px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.12rem; font-weight: 600; }

/* mcp */
.mcp { background: var(--bg-alt); border-block: 1px solid var(--line); }
.mcp-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.mcp p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding-left: 26px; position: relative; margin: 10px 0; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.term { margin: 0; background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); padding: 22px 24px; font: .86rem/1.65 var(--mono); overflow-x: auto; box-shadow: var(--shadow); white-space: pre; }
.term .c { color: var(--term-dim); }

/* proof */
.table-wrap { overflow-x: auto; margin: 36px auto 22px; max-width: 900px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
tr:last-child td { border-bottom: 0; }
td.ok { color: var(--ok); font-weight: 700; white-space: nowrap; }

/* start + faq */
.start .term { margin-top: 28px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 650; font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--accent-ink); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-row nav a { color: var(--muted); }
.foot-row .fine { width: 100%; margin: 0; }

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .mcp-grid { grid-template-columns: 1fr; }
  .features, .cases { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline li::after { display: none; }
  .nav nav a:not(.btn) { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .features, .cases, .pipeline { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
  .hero { padding-top: 44px; }
  .cmd { width: 100%; justify-content: space-between; }
}

/* Grid and flex children must be allowed to shrink below their content, or a
   long code line widens the whole page on a phone. */
.hero-grid > *, .mcp-grid > *, .grid > *, .pipeline > * { min-width: 0; }
.term, .table-wrap { max-width: 100%; }
@media (max-width: 620px) {
  .cmd { overflow-x: auto; }
  .eyebrow { letter-spacing: .08em; }
}

/* Analytics consent (assets/js/analytics.js) */
.consent {
  position: fixed; z-index: 50;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); box-shadow: var(--shadow);
  font-size: .9rem;
}
.consent p { margin: 0; flex: 1 1 260px; color: var(--muted); }
.consent-actions { display: flex; gap: 8px; }
.consent .btn { padding: 8px 14px; font-size: .9rem; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}

/* Upgrade agent section */
.upgrade p { color: var(--muted); }
.table-wrap.compact { margin: 22px 0 10px; max-width: none; }
.table-wrap.compact table { font-size: .9rem; }
