:root {
  --bg: #fff;
  --fg: #000;
  --muted: #666;
  --faint: #999;
  --border: #e5e5e5;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --fg: #fff;
    --muted: #999;
    --faint: #666;
    --border: #1a1a1a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

code, pre {
  font-family: var(--mono);
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.topbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.625rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 600;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main section {
  margin: 5rem 0;
}

.hero {
  margin-top: 6rem;
}

h1 {
  font-family: var(--mono);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin-top: 1.5rem;
  color: var(--muted);
  max-width: 60ch;
}

.hero .codeblock {
  margin-top: 2rem;
}

.badge {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.125rem 0.5rem;
}

.codeblock {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.codeblock pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.125rem 0.5rem;
  cursor: pointer;
}

.copy:hover {
  color: var(--fg);
}

.pipeline {
  width: min(1960px, 100vw - 2.5rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.diagram {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.25rem;
  overflow-x: auto;
}

.diagram img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
}

.pipeline .caption {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.caption, figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.25rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--muted);
}

.codeline, .report {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

.report {
  color: var(--muted);
}

.machine ul {
  list-style: none;
}

.machine li {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.machine li:first-child {
  border-top: 1px solid var(--border);
}

.dashboard img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.quickstart p {
  margin-top: 1rem;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 6rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  main section {
    margin: 3.5rem 0;
  }

  .hero {
    margin-top: 3.5rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}
