@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Roboto:wght@400;500;700;900&display=swap");

:root {
  --page: #ffffff;
  --surface: #f4f4f4;
  --surface-hover: #ebebeb;
  --line: rgba(0, 0, 0, 0.09);
  --text: #141414;
  --text-muted: rgba(0, 0, 0, 0.45);
  --text-body: rgba(0, 0, 0, 0.72);
  --button: #141414;
  --button-text: #ffffff;
  --well: #141414;
  --well-text: #ebebeb;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 760px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1f1f1f;
    --surface: #292929;
    --surface-hover: #333333;
    --line: rgba(255, 255, 255, 0.09);
    --text: #ebebeb;
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-body: rgba(255, 255, 255, 0.72);
    --button: #ebebeb;
    --button-text: #141414;
    --well: #141414;
    --well-text: #ebebeb;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  text-decoration: none;
  z-index: 10;
}

.skip:focus {
  top: 16px;
}

.logo {
  display: block;
  aspect-ratio: 381.7 / 91.4;
  background: currentColor;
  -webkit-mask: url("/logo.svg") center / contain no-repeat;
  mask: url("/logo.svg") center / contain no-repeat;
}

/* Header and footer */

.site-header,
.site-footer,
main {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-header .logo {
  width: 104px;
  color: var(--text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-right: -10px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

main {
  flex: 1;
  padding-top: 24px;
  padding-bottom: 64px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer a {
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.site-footer a:hover {
  color: var(--text);
}

/* Home */

.home main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 96px;
}

.home .site-header {
  justify-content: flex-end;
}

.home h1 {
  margin: 0 0 28px;
}

.home h1 .logo {
  width: min(420px, 78vw);
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tagline {
  max-width: 30em;
  margin: 0 0 32px;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

/* Text pages */

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

.lede {
  margin: 0 0 40px;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}

h2 {
  margin: 48px 0 10px;
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  margin: 28px 0 6px;
  font-size: 1rem;
  font-weight: 500;
}

main p,
main li {
  color: var(--text-body);
}

main p {
  margin: 0 0 14px;
}

main ul,
main ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

main li {
  margin: 4px 0;
}

main a {
  text-decoration-color: var(--text-muted);
  text-underline-offset: 3px;
}

main a:hover {
  text-decoration-color: currentColor;
}

strong {
  color: var(--text);
  font-weight: 500;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface);
  letter-spacing: 0;
}

kbd {
  font-family: var(--font);
  font-size: 0.8125em;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line);
  color: var(--text);
}

.command {
  position: relative;
  margin: 12px 0 20px;
}

.command pre {
  margin: 0;
  padding: 14px 84px 14px 16px;
  border-radius: 10px;
  background: var(--well);
  color: var(--well-text);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  letter-spacing: 0;
}

.command pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.copy {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 11px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #ebebeb;
  font: 500 0.8125rem/1.4 var(--font);
  cursor: pointer;
}

.copy:hover {
  background: rgba(255, 255, 255, 0.2);
}

.note {
  margin: 0 0 32px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
}

.note > :last-child {
  margin-bottom: 0;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  padding: 11px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font: 500 0.9375rem/1.2 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  opacity: 0.86;
}

.button[aria-disabled="true"] {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

/* Download */

.release {
  margin: 0 0 12px;
  padding: 24px;
  border-radius: 14px;
  background: var(--surface);
}

.release-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.release-head h2 {
  margin: 0;
}

.release-head p {
  margin: 2px 0 0;
  color: var(--text-muted);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 24px;
  margin: 0;
  font-size: 0.9375rem;
}

.facts dt {
  color: var(--text);
  font-weight: 500;
}

.facts dd {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Source */

.repos {
  list-style: none;
  padding: 0 !important;
  display: grid;
  gap: 8px;
}

.repos li {
  margin: 0;
}

.repos a {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}

.repos a:hover {
  background: var(--surface-hover);
}

.repos strong {
  display: block;
}

.repos span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .site-nav {
    margin: 0 -10px;
  }

  h1 {
    font-size: 2rem;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .facts dd {
    margin-bottom: 10px;
  }
}
