:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5f6368;
  --subtle: #f5f5f5;
  --line: #d9d9d9;
  --line-strong: #0a0a0a;
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow: rgba(10, 10, 10, 0.08);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a0a;
    --ink: #ffffff;
    --muted: #a6a6a6;
    --subtle: #161616;
    --line: #2b2b2b;
    --line-strong: #ffffff;
    --header-bg: rgba(10, 10, 10, 0.92);
    --shadow: rgba(255, 255, 255, 0.08);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --ink: #ffffff;
  --muted: #a6a6a6;
  --subtle: #161616;
  --line: #2b2b2b;
  --line-strong: #ffffff;
  --header-bg: rgba(10, 10, 10, 0.92);
  --shadow: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5f6368;
  --subtle: #f5f5f5;
  --line: #d9d9d9;
  --line-strong: #0a0a0a;
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow: rgba(10, 10, 10, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 18px max(22px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.brand,
.site-footer > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand img,
.site-footer img {
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.theme-toggle:hover {
  border-color: var(--ink);
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50%);
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

nav a:hover,
.text-link:hover {
  color: var(--ink);
}

main {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 56px;
  align-items: center;
  padding: 104px 0 96px;
  border-bottom: 1px solid var(--line-strong);
}

.compact-hero {
  padding-bottom: 62px;
}

.kicker,
.section-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.lede {
  max-width: 690px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.2vw, 1.38rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-weight: 700;
}

.button.compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.94rem;
}

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

.button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.button:hover {
  transform: translateY(-1px);
}

.terminal,
.docs-grid article {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--subtle);
}

.terminal {
  padding: 22px;
}

.terminal-title {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}

pre + pre {
  margin-top: 12px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
}

.grid,
.capabilities,
.docs,
.integrations,
.blog {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 56px;
}

.body-copy {
  color: var(--muted);
  font-size: 1.06rem;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cards article {
  min-height: 220px;
  padding: 24px;
  background: var(--bg);
}

.section-heading {
  max-width: 820px;
}

.section-intro {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.integration-steps {
  display: grid;
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--line);
}

.integration-steps article {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
  min-width: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.integration-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.integration-title img {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.integration-title h2,
.integration-title h3,
.docs-grid h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.integration-steps p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  margin-top: 24px;
}

.cards p,
.checklist {
  color: var(--muted);
}

.checklist {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  font-size: 1.04rem;
}

.docs-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.docs-head h2 {
  max-width: 720px;
}

.text-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.docs-grid article {
  padding: 22px;
}

.docs-grid p {
  margin: 16px 0 0;
  color: var(--muted);
}

.page-section {
  padding-top: 62px;
}

.lower-docs {
  align-items: center;
  margin-top: 44px;
  margin-bottom: 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.blog-feature,
.post-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  max-width: 980px;
}

.blog-feature img,
.post-card img,
.article-header img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-meta,
.article-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.blog-feature h2,
.post-card h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.blog-feature p:not(.post-meta),
.post-card p:not(.post-meta) {
  color: var(--muted);
}

.blog-list {
  display: grid;
  gap: 42px;
}

.article {
  max-width: 900px;
  margin: 0 auto;
  padding: 84px 22px;
}

.article-header {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line-strong);
}

.article-header h1 {
  max-width: 860px;
}

.article-header img {
  margin-top: 34px;
}

.article-body {
  max-width: 740px;
  padding-top: 42px;
}

.article-body p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.72;
}

.article-body a:not(.button) {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-signoff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.article-signoff p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 28px 22px;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img,
  :root:not([data-theme="light"]) .site-footer img,
  :root:not([data-theme="light"]) .integration-title img {
    filter: invert(1);
  }
}

:root[data-theme="dark"] .brand img,
:root[data-theme="dark"] .site-footer img,
:root[data-theme="dark"] .integration-title img {
  filter: invert(1);
}

:root[data-theme="light"] .brand img,
:root[data-theme="light"] .site-footer img,
:root[data-theme="light"] .integration-title img {
  filter: none;
}

@media (max-width: 880px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-toggle {
    align-self: flex-start;
  }

  .hero,
  .grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 38px;
    padding: 54px 0 66px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-steps article {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .blog-feature,
  .post-card {
    grid-template-columns: 1fr;
  }

  .docs-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  main {
    padding: 0 16px;
  }

  .site-header,
  .site-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

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

  .cards article {
    min-height: 0;
  }

  .button {
    width: 100%;
  }

  .article-signoff {
    align-items: flex-start;
    flex-direction: column;
  }

  pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
}
