:root {
  --paper: #ffffff;
  --paper-alt: #f5f7fa;
  --ink: #0b1118;
  --muted: #55606d;
  --line: #cbd2da;
  --line-dark: #8a949f;
  --blue: #0647c8;
  --blue-dark: #00358f;
  --lime: #b7ef28;
  --terminal: #0b1820;
  --terminal-line: #263844;
  --terminal-text: #e7edf1;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --content: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:target { scroll-margin-top: 6rem; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
button, input { font: inherit; }
code, pre, kbd { font-family: var(--mono); }
.skip-link {
  position: fixed;
  z-index: 100;
  left: 1rem;
  top: 1rem;
  padding: .65rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.header-inner, .footer-inner {
  width: min(100%, calc(var(--content) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: 1.15rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.wordmark {
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 750;
  letter-spacing: -.04em;
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.site-nav a { color: var(--ink); font-weight: 650; text-decoration: none; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav .nav-download { padding-left: 1.25rem; border-left: 1px solid var(--line); color: var(--blue); }
.nav-toggle { display: none; border: 1px solid var(--ink); background: var(--paper); padding: .45rem .7rem; }

.page-section {
  width: min(100%, calc(var(--content) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 7.5rem) var(--gutter);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(31rem, 1.05fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
  padding-top: clamp(4.5rem, 8vw, 8rem);
  padding-bottom: 3rem;
}
.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.25rem, 6.3vw, 6.1rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.hero-copy > p {
  max-width: 33rem;
  margin: 2rem 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }
.button {
  display: inline-flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  padding: .8rem 1.2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  font-weight: 750;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { color: var(--ink); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.button.primary { background: var(--lime); }
.mini-code {
  position: relative;
  max-width: 40rem;
  border: 1px solid var(--line-dark);
  background: var(--paper);
}
.mini-code pre { margin: 0; padding: 1.25rem 4.8rem 1.25rem 1.25rem; overflow-x: auto; font-size: .85rem; line-height: 1.9; }
.copy-button {
  position: absolute;
  right: .65rem;
  top: .65rem;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-family: var(--mono);
  font-size: .72rem;
  cursor: pointer;
}
.terminal {
  overflow: hidden;
  min-height: 34rem;
  border: 1px solid var(--ink);
  border-radius: 7px;
  color: var(--terminal-text);
  background: var(--terminal);
  box-shadow: 12px 12px 0 #e3e8ed;
}
.terminal-bar { padding: .7rem 1rem; border-bottom: 1px solid var(--terminal-line); color: #aebcc5; font-family: var(--mono); font-size: .8rem; }
.terminal-bar strong { color: var(--lime); }
.terminal pre { margin: 0; padding: 1.6rem; white-space: pre-wrap; font-size: clamp(.73rem, 1.15vw, .9rem); line-height: 1.65; }
.sql { color: var(--lime); }
.hit { color: #c8fa48; font-weight: 800; }
.comment { color: #8fa2ae; }

.proof-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, calc(var(--content) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(4rem, 7vw, 6rem);
}
.proof-item { padding: 1.5rem clamp(1rem, 2.5vw, 2rem); border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { padding-right: 0; border-right: 0; }
.proof-item strong { display: block; margin-bottom: .5rem; font-size: 1.05rem; }
.proof-item p { margin: 0; color: var(--muted); font-size: .92rem; }

.band { border-block: 1px solid var(--line); background: var(--paper-alt); }
.section-grid { display: grid; grid-template-columns: minmax(15rem, .42fr) minmax(0, 1fr); gap: clamp(3rem, 7vw, 7rem); }
.section-intro h2 { max-width: 10ch; margin: 0 0 1.5rem; font-size: clamp(2.7rem, 5vw, 5rem); line-height: 1; letter-spacing: -.055em; }
.section-intro p { max-width: 25rem; color: var(--muted); font-family: var(--mono); }
.section-rule { width: 3rem; height: .3rem; margin-bottom: 2rem; background: var(--lime); }
.benchmark-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); background: var(--paper); }
.benchmark-metric { min-width: 0; padding: clamp(1.25rem, 3vw, 2.25rem); border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.benchmark-metric span { color: var(--muted); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.benchmark-metric strong { display: block; margin: .65rem 0 .25rem; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.05em; }
.benchmark-metric p, .benchmark-note { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .78rem; }
.benchmark-note { margin-top: 1rem; }

.quick-start h2, .docs-index h2 { margin: 0 0 2.5rem; font-size: clamp(2.4rem, 4vw, 4.2rem); line-height: 1.05; letter-spacing: -.05em; }
.quick-start-lead { max-width: 55rem; margin: -1rem 0 2.5rem; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.step { min-height: 10rem; padding: 1rem 1.5rem 1.5rem 0; }
.step-number { display: inline-grid; width: 2.6rem; height: 2.6rem; place-items: center; margin-bottom: 1rem; border: 1px solid var(--line); font-family: var(--mono); }
.step:first-child { border-bottom: 4px solid var(--blue); }
.step:first-child .step-number { border-color: var(--blue); color: var(--blue); }
.step strong { display: block; margin-bottom: .45rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
.install-command { position: relative; border: 1px solid var(--line-dark); background: var(--paper-alt); }
.install-command .command-label { padding: .65rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.install-command pre { margin: 0; padding: 1.5rem; overflow-x: auto; font-size: clamp(.85rem, 1.4vw, 1.05rem); }
.quick-start-more { margin: 1.25rem 0 0; }

.architecture { border-block: 1px solid var(--line); }
.architecture-inner { display: grid; grid-template-columns: .35fr 1fr; align-items: center; gap: 3rem; }
.architecture h2 { margin: 0; font-size: 1.25rem; }
.architecture-flow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--blue); font-weight: 750; }
.architecture-flow .node { padding: 1rem; border: 1px solid #94afe8; background: var(--paper); }
.architecture-flow .arrow { color: var(--blue); font-family: var(--mono); }

.docs-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.docs-link { display: grid; grid-template-columns: 1fr auto; gap: .35rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.docs-link:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.docs-link:nth-child(even) { padding-left: 2rem; }
.docs-link strong { color: var(--blue); }
.docs-link span { grid-column: 1; color: var(--muted); font-size: .88rem; }
.docs-link b { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--blue); font-family: var(--mono); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer p { margin: 0; color: var(--muted); font-family: var(--mono); font-size: .82rem; }
.site-footer a:last-child { font-weight: 700; }

.doc-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 52rem);
  gap: clamp(2rem, 6vw, 6rem);
  width: min(100%, calc(82rem + 2 * var(--gutter)));
  margin-inline: auto;
  padding: 4rem var(--gutter) 7rem;
  align-items: start;
}
.doc-sidebar { position: sticky; top: 7rem; display: grid; gap: 2rem; }
.doc-nav { display: grid; gap: .6rem; padding-right: 2rem; border-right: 1px solid var(--line); }
.doc-nav p, .doc-toc p { margin: 0 0 .6rem; color: var(--muted); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.doc-nav a { color: var(--ink); font-size: .9rem; text-decoration: none; }
.doc-nav a:hover { color: var(--blue); }
.doc-nav a[aria-current="page"] { color: var(--blue); font-weight: 750; }
.doc-toc { padding-right: 2rem; }
.doc-toc ol { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.doc-toc a { color: var(--muted); font-size: .8rem; line-height: 1.35; text-decoration: none; }
.doc-toc a:hover, .doc-toc a[aria-current="true"] { color: var(--blue); }
.doc-content { min-width: 0; overflow-wrap: anywhere; }
.doc-heading { display: flex; gap: .65rem; margin-bottom: 2.5rem; color: var(--muted); font-family: var(--mono); }
.doc-content h1 { margin: 0 0 2rem; font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.055em; }
.doc-content h2 { margin: 3.5rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; letter-spacing: -.035em; }
.doc-content h3 { margin-top: 2.5rem; font-size: 1.25rem; }
.doc-content p, .doc-content li { color: #303a44; }
.doc-content pre { overflow-x: auto; padding: 1.2rem; border: 1px solid var(--line-dark); color: var(--terminal-text); background: var(--terminal); font-size: .83rem; line-height: 1.65; }
.doc-content :not(pre) > code { padding: .12rem .3rem; color: #003c9e; background: #edf3ff; font-size: .88em; }
.doc-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .88rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.doc-content th, .doc-content td { padding: .7rem .8rem; border: 1px solid var(--line); text-align: left; }
.doc-content th { background: var(--paper-alt); }
.doc-content blockquote { margin: 1.5rem 0; padding: .2rem 1.25rem; border-left: 4px solid var(--lime); background: var(--paper-alt); }
.doc-content img { max-width: 100%; }

@media (max-width: 980px) {
  .hero, .section-grid, .architecture-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 4rem; }
  .hero h1 { max-width: 11ch; }
  .terminal { min-height: 0; }
  .proof-rail { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(2) { border-right: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .doc-shell { grid-template-columns: 1fr; }
  .doc-sidebar { position: static; gap: 1.5rem; }
  .doc-nav { grid-template-columns: repeat(2, 1fr); padding: 0 0 1.5rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .doc-nav p { grid-column: 1 / -1; }
  .doc-toc { padding: 0 0 1.5rem; border-bottom: 1px solid var(--line); }
  .doc-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .js .nav-toggle { display: block; }
  .site-nav { width: 100%; align-items: stretch; flex-direction: column; gap: 0; }
  .js .site-nav { display: none; }
  .js .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: .75rem 0; border-top: 1px solid var(--line); }
  .site-nav .nav-download { padding-left: 0; border-left: 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 4.6rem); }
  .proof-rail, .steps, .docs-list { grid-template-columns: 1fr; }
  .proof-item { padding: 1.25rem 0; border-right: 0; }
  .step { min-height: 0; padding-right: 0; }
  .docs-link:nth-child(odd), .docs-link:nth-child(even) { padding-inline: 0; border-right: 0; }
  .architecture-flow { align-items: stretch; flex-direction: column; }
  .architecture-flow .arrow { transform: rotate(90deg); align-self: center; }
  .benchmark-summary { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .doc-nav, .doc-toc ol { grid-template-columns: 1fr; }
  .doc-content table { font-size: .8rem; }
  .doc-content th, .doc-content td { padding: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1319;
    --paper-alt: #111a22;
    --ink: #eef3f6;
    --muted: #9facb5;
    --line: #33414c;
    --line-dark: #586874;
    --blue: #75a7ff;
    --blue-dark: #a8c7ff;
  }
  .site-header { background: rgba(13,19,25,.96); }
  .button { box-shadow: 3px 3px 0 #8c98a2; }
  .button.primary { color: #07110a; }
  .terminal { box-shadow: 12px 12px 0 #1b2933; }
  .doc-content p, .doc-content li { color: #d3dce2; }
  .doc-content :not(pre) > code { color: #b9d0ff; background: #172a45; }
}
