body {
  margin: 0;
  background: #f7f7f4;
  color: #1f2528;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}

.intro {
  border-bottom: 1px solid #d7d7d0;
  margin-bottom: 28px;
  padding-bottom: 22px;
}

.label {
  color: #61727d;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  margin: 0 0 14px;
}

h2 {
  border-bottom: 1px solid #d7d7d0;
  font-size: 1.45rem;
  margin: 34px 0 14px;
  padding-bottom: 6px;
}

p {
  margin: 0 0 14px;
}

code,
pre {
  font-family: "Courier New", Courier, monospace;
}

code {
  background: #ecece7;
  border-radius: 3px;
  padding: 1px 4px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

.arrangements {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 8px;
}

figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

figcaption {
  color: #4e5b61;
  font-size: 0.9rem;
  margin-top: 6px;
  text-align: center;
}

.arrangements img,
.legend img {
  background: #d8d8d2;
  border: 1px solid #c7c7c0;
  border-radius: 4px;
}

.legend {
  margin-top: 14px;
}

.legend img {
  margin: 0 auto;
}

.diagram {
  background: #ffffff;
  border: 1px solid #d7d7d0;
  border-radius: 4px;
  margin: 18px 0;
  padding: 14px;
}

.pipeline {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr 24px 1fr;
  text-align: center;
}

.pipeline div,
.scoring div,
.scoring strong {
  background: #f1f1ed;
  border: 1px solid #d7d7d0;
  border-radius: 4px;
  padding: 10px;
}

.pipeline span {
  border-top: 2px solid #75858d;
  display: block;
  position: relative;
}

.pipeline span::after {
  border-bottom: 5px solid transparent;
  border-left: 7px solid #75858d;
  border-top: 5px solid transparent;
  content: "";
  position: absolute;
  right: -1px;
  top: -6px;
}

.formula {
  background: #20272b;
  border-radius: 4px;
  color: #ffffff;
  overflow-x: auto;
  padding: 14px;
}

.formula code {
  background: transparent;
  padding: 0;
}

.scoring {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
}

.scoring strong {
  background: #dfeee8;
}

@media (max-width: 800px) {
  .arrangements {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline,
  .scoring {
    grid-template-columns: 1fr;
  }

  .pipeline span {
    height: 16px;
    margin: 0 auto;
    width: 2px;
  }

  .pipeline span::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .arrangements {
    grid-template-columns: 1fr;
  }
}
