:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --fg: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --code-bg: #f0efed;
  --accent: #15803d;
  --accent-fg: #ffffff;
  --accent-soft: #dcfce7;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #161413;
    --fg: #e7e5e4;
    --muted: #a8a29e;
    --line: #292524;
    --code-bg: #1c1917;
    --accent: #4ade80;
    --accent-fg: #052e16;
    --accent-soft: #14301f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main,
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
}

h2 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h3 {
  font-size: 1rem;
  margin: 0 0 4px;
}

p,
ul {
  margin: 0 0 16px;
}

section {
  padding-top: 56px;
}

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

/* Hero */

.hero {
  padding-top: 72px;
  text-align: center;
}

.hero .icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto;
}

.hero p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 12px;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button.secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}

.button:hover {
  opacity: 0.9;
}

.button.secondary:hover {
  border-color: var(--muted);
  opacity: 1;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

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

/* Download rows */

.platforms {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 12px;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
}

.platform + .platform {
  border-top: 1px solid var(--line);
}

.platform .small {
  margin: 0;
}

.platform-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-links .button {
  padding: 6px 14px;
  min-width: 72px;
  text-align: center;
}

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

/* CLI */

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
}

.step span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 0.8125rem;
}

.label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin: 16px 0 6px;
}

code,
pre {
  font: 0.875rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 8px;
}

.codeblock {
  position: relative;
  margin: 0 0 8px;
}

.codeblock pre {
  margin: 0;
  padding-right: 76px;
}

pre code {
  background: none;
  padding: 0;
}

.commands {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  align-items: baseline;
  margin: 0 0 16px;
}

.commands dt code {
  font-size: 0.875rem;
}

.commands dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.copy {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 7px 7px 0;
  background: var(--code-bg);
  color: var(--muted);
  font: 0.75rem/1 system-ui, sans-serif;
  cursor: pointer;
}

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

/* FAQ */

details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

details:first-of-type {
  border-top: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 10px 0 4px;
  color: var(--muted);
}

/* Footer */

footer {
  margin-top: 72px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
}

/* Privacy page and other plain pages */

.page {
  padding-top: 48px;
}

.page h2 {
  font-size: 1.125rem;
  margin: 32px 0 8px;
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero {
    padding-top: 48px;
  }

  .downloads .button {
    flex: 1 1 100%;
    text-align: center;
  }

  .commands {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .commands dd {
    margin-bottom: 12px;
  }
}
