:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --paper: #ffffff;
  --ink: #1b2130;
  --muted: #4f5a6d;
  --line: #d6dce6;
  --brand: #0b5d57;
  --brand-ink: #ffffff;
  --code-bg: #eef1f5;
  --focus: #b5470f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181f;
    --paper: #1c2129;
    --ink: #e8ecf2;
    --muted: #aab4c3;
    --line: #333b48;
    --brand: #6fd0c6;
    --brand-ink: #10201e;
    --code-bg: #10141a;
    --focus: #ffb27a;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

code,
pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 10;
}

.skip-link:focus {
  top: 8px;
}

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 700;
}

.brand img {
  border-radius: 6px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
}

.site-header nav a:hover {
  text-decoration: underline;
}

main > section {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

main > section:last-child {
  border-bottom: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
}

h3 {
  font-size: 1.1rem;
  margin-top: 28px;
}

p {
  margin: 0 0 14px;
}

.lead {
  font-size: 1.2rem;
  max-width: 44ch;
}

.small {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: var(--brand);
  background: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.button.primary {
  background: var(--brand);
  color: var(--brand-ink);
}

.button:hover {
  text-decoration: underline;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  min-width: 0;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.code-block {
  position: relative;
  margin: 0 0 16px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.code-block pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

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

.no-js .copy {
  display: none;
}

html:not(.no-js) .code-block pre {
  padding-right: 84px;
}

.pipeline {
  padding-left: 0;
  margin: 0 0 16px;
  list-style: none;
  counter-reset: step;
}

.pipeline li {
  position: relative;
  padding: 0 0 14px 44px;
  counter-increment: step;
}

.pipeline li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  text-align: center;
  line-height: 30px;
}

.pipeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 0;
  border-left: 2px solid var(--line);
}

.stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 20px;
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats div {
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.stats dd {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

th,
td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper);
}

.counts td:nth-child(2) {
  white-space: nowrap;
}

.limits {
  padding-left: 20px;
  margin: 0;
}

.limits li {
  margin-bottom: 12px;
}

.site-footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
